And creating more popup-approval fatigue doesn't help anyone.
You are a super-user, so it might be the git clone URL of a really long commit. That "click to copy" button on github is really useful.
The same scenario exists from Grandma, and she will click the popup or give up in frustration - neither of which is good.
IMO, sites should be able to have access to the copy buffer but not to the paste. Paste should be available to the user with ctrl+P. Definitely not perfect, but more mitigable.
And yes, there would be fatigue, and me-the-super-user would globally block those popups from coming up. It's honestly not worth it. I would miss it maybe once a month, which is about how often I get annoyed by something messing with it.
Maybe a middle ground would be allowing websites to _insert_ things into the buffer, but not _modifying_ the buffer. (Though of course, they could just inspect what's highlighted on the page, and then flat out insert that plus their garbage, except I'd argue that I don't think they need to know what I've got highlighted, then you'd point out that that would break Google Docs, and I'd suggest another popup, and you'd say that Grandma can't handle the fatigue, etc., etc.)
The stupid thing about AMP is that it's trying to push sites back into the "document" box, but only so that they can be monetized more effectively by Google...
Allow Gmail to run as an application in your browser?
[Deny] [Allow] [Always Allow]
The clipboard contained junk (basically advertising) with numerous new lines. Fortunately, none of it did anything, but it was a good learning experience that I cannot trust the browser to copy the selected text as is.
The very annoying thing was that the text was copied from a website with code snippets, in this specific case, some terminal commands to run. And they hijacked the clipboard so the commands are corrupted when copied and pasted. That's so asinine..
Allowing client-side JavaScript to alter clipboard content like this is a security vulnerability. What if a page suggested copying and pasting some text in a terminal, then replaced the clipboard contents with arbitrary commands.
I can imagine some exceptions, like "Copy to clipboard" functionality, but there's gotta be a reasonable solution.
Now that I know about this vulnerability, I have to copy & paste anything into an editor first, to make sure that it's what I actually selected and copied.
The internet is broken.