Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions site/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,17 @@ <h2>It writes as you. You decide where.</h2>
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): 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;
}
copyButton.classList.add('done');
copyStatus.textContent = 'Copied';
// 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);
});

Expand Down
Loading