4 ms·
I wouldn't ever enable clipboard integration -- a malicious site could use it to collect data by using the paste command with execCommand -- they'd grab whateve
by chiph 11y ago
I wouldn't ever enable clipboard integration -- a malicious site could use it to collect data by using the paste command with execCommand -- they'd grab whatever was on my clipboard, which could include my banking password from my password manager app that I was just getting ready to use.
- om2 11y agoThat's why they only get the ability to programmatically trigger cut and copy, not paste.
- frou_dh 11y agoI guess there's room for an attack of irritation where a user with something meaningful on their clipboard unwittingly triggers having it overwritten by some nonsense. (Most clipboards effectively being a single mutable item without history or stack/queue behaviour).
- scrollaway 11y agoThere's easier ways to irritate your users. Most websites irritate their users, actually.
- frou_dh 11y agoSpeaking of clipboard shenanigans. Could be imagining it, but I seem to remember a while ago there being something certain websites were doing where if you selected and copied text from them, the text that ended up on your clipboard would have a synthesized paragraph about copyright/attribution appended to it.
- scrollaway 11y agoYeah, occured to me reading that comment. Lyrics websites used to do it a lot (probably still do). I believe they use invisible text.
- copperx 11y agoiBooks does exactly that; it irritates me to no end. I know why they do it, but still.
- jsjohnst 11y agoYeah, many tech news sites used to do this. I'm not positive, but I think TechCrunch did at one point, I could be wrong though. Absolutely hate it personally!
- ascagnel_ 11y agoTynt basically did this exact thing as a business model[0]. [0] http://daringfireball.net/2010/05/tynt_copy_paste_jerks http://daringfireball.net/2010/05/tynt_copy_paste_jerks
- chiph 11y agoMozilla has it documented. Didn't see anything on the linked site. https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand https://developer.mozilla.org/en-US/docs/Web/API/Document/ex...
- masklinn 11y agoFirefox only makes execCommand("paste") available in trusted contexts aka extensions. You can't execCommand("paste") on a regular web page for fairly obvious security reasons.
- snowwrestler 11y agoIs there programmatic access to the paste command? I only see cut and copy listed.
- dantiberian 11y agoPaste is disallowed for just this reason.