From dccdb791bc90188f72e4e894c4b25d59cbee86bc Mon Sep 17 00:00:00 2001 From: RealDoc06 <73218979+RealDoc06@users.noreply.github.com> Date: Sat, 21 Nov 2026 00:49:32 +0100 Subject: [PATCH 1/4] fix(site): keep the Windows command selected when uBlock blocks the copy uBlock Origin's ClickFix filter drops clipboard writes of `irm ... | iex` without failing, so the button showed Copied while the clipboard kept old text. Select the command first so Ctrl+C still works. Co-Authored-By: Claude Opus 5.5 --- site/public/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/public/index.html b/site/public/index.html index 4f2d21f..f65c990 100644 --- a/site/public/index.html +++ b/site/public/index.html @@ -541,6 +541,9 @@

It writes as you. You decide where.

const command = document.getElementById('install-cmd'); resetCopy(); const attempt = copyAttempt; + // Selected first, so one more gesture copies it when the write fails or is dropped: + // uBlock Origin's ClickFix filter resolves writeText without writing for `irm ... | iex`. + getSelection().selectAllChildren(command); let copied = true; try { await navigator.clipboard.writeText(command.textContent); @@ -549,8 +552,7 @@

It writes as you. You decide where.

} if (attempt !== copyAttempt) return; // a newer click or another system took over if (!copied) { - // No clipboard access (plain http, old webview): select it so one more gesture copies. - getSelection().selectAllChildren(command); + // No clipboard access (plain http, old webview). copyStatus.textContent = 'Command selected. Copy it with your keyboard.'; return; } From a1be8d578871e2b46694a8592078ebec4cad5985 Mon Sep 17 00:00:00 2001 From: RealDoc06 <73218979+RealDoc06@users.noreply.github.com> Date: Sat, 21 Nov 2026 00:55:00 +0100 Subject: [PATCH 2/4] fix(site): tell screen readers the command is selected after copying Co-Authored-By: Claude Opus 5.5 --- site/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/public/index.html b/site/public/index.html index f65c990..09fb624 100644 --- a/site/public/index.html +++ b/site/public/index.html @@ -557,7 +557,7 @@

It writes as you. You decide where.

return; } copyButton.classList.add('done'); - copyStatus.textContent = 'Copied'; + copyStatus.textContent = 'Copied. The command is also selected, in case the copy was blocked.'; // a blocked write resolves too copyTimer = setTimeout(resetCopy, 1600); }); From 282e56d907dc588f17e64bf07b130f92feda5af1 Mon Sep 17 00:00:00 2001 From: RealDoc06 <73218979+RealDoc06@users.noreply.github.com> Date: Sat, 21 Nov 2026 00:56:35 +0100 Subject: [PATCH 3/4] fix(site): lead the copy status with the selection, reselect on late failures Co-Authored-By: Claude Opus 5.5 --- site/public/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/public/index.html b/site/public/index.html index 09fb624..66f3a2c 100644 --- a/site/public/index.html +++ b/site/public/index.html @@ -552,12 +552,14 @@

It writes as you. You decide where.

} if (attempt !== copyAttempt) return; // a newer click or another system took over if (!copied) { - // No clipboard access (plain http, old webview). + // No clipboard access (plain http, old webview). Selected again: a slow rejection may come after a click elsewhere. + getSelection().selectAllChildren(command); copyStatus.textContent = 'Command selected. Copy it with your keyboard.'; return; } copyButton.classList.add('done'); - copyStatus.textContent = 'Copied. The command is also selected, in case the copy was blocked.'; // a blocked write resolves too + // A blocked write resolves too, so lead with what the page knows for sure. + copyStatus.textContent = 'Command selected and copied. If it does not paste, copy it with your keyboard.'; copyTimer = setTimeout(resetCopy, 1600); }); From b2b68527d605a4bad642f9ad7d7124ea96ff19ba Mon Sep 17 00:00:00 2001 From: RealDoc06 <73218979+RealDoc06@users.noreply.github.com> Date: Sat, 21 Nov 2026 00:57:49 +0100 Subject: [PATCH 4/4] fix(site): select the command once after the copy settles Co-Authored-By: Claude Opus 5.5 --- site/public/index.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/site/public/index.html b/site/public/index.html index 66f3a2c..f787ba2 100644 --- a/site/public/index.html +++ b/site/public/index.html @@ -541,9 +541,6 @@

It writes as you. You decide where.

const command = document.getElementById('install-cmd'); resetCopy(); const attempt = copyAttempt; - // Selected first, so one more gesture copies it when the write fails or is dropped: - // uBlock Origin's ClickFix filter resolves writeText without writing for `irm ... | iex`. - getSelection().selectAllChildren(command); let copied = true; try { await navigator.clipboard.writeText(command.textContent); @@ -551,15 +548,17 @@

It writes as you. You decide where.

copied = false; } if (attempt !== copyAttempt) return; // a newer click or another system took over + // Selected either way, so one more gesture copies it when the write fails or is dropped: + // uBlock Origin's ClickFix filter resolves writeText without writing for `irm ... | iex`. + getSelection().selectAllChildren(command); if (!copied) { - // No clipboard access (plain http, old webview). Selected again: a slow rejection may come after a click elsewhere. - getSelection().selectAllChildren(command); + // No clipboard access (plain http, old webview). copyStatus.textContent = 'Command selected. Copy it with your keyboard.'; return; } copyButton.classList.add('done'); - // A blocked write resolves too, so lead with what the page knows for sure. - copyStatus.textContent = 'Command selected and copied. If it does not paste, copy it with your keyboard.'; + // A blocked write resolves too and leaves the old clipboard, so lead with what the page knows for sure. + copyStatus.textContent = 'Command selected and copied. If something else pastes, copy it with your keyboard.'; copyTimer = setTimeout(resetCopy, 1600); });