Live data from Hacker News

Don't touch my clipboard

alexanderell.is

41–50 of 322 posts

Re: Don't touch my clipboard

#41

The wrongest thing about this, from my perspective, is that my browser fires off a js 'copy' event when I press control-c. There are times when I've found it helpful that a browser can copy text to my clipboard when I click a button, but I can't think of a single time when I want a site to react to my attempt to copy text off if it. Is there any way to configure my user agent (Firefox) not to do this? A hack is ok.

> I can't think of a single time when I want a site to react to my attempt to copy text off if it. Any time you're not interacting with HTML text is a time it could be useful.

Specifically, things like copying a cell of data in Google Sheets for example.

Re: Don't touch my clipboard

#42

The wrongest thing about this, from my perspective, is that my browser fires off a js 'copy' event when I press control-c. There are times when I've found it helpful that a browser can copy text to my clipboard when I click a button, but I can't think of a single time when I want a site to react to my attempt to copy text off if it. Is there any way to configure my user agent (Firefox) not to do this? A hack is ok.

You can turn off JavaScript. This has the added benefit of disabling most tracking and advertising.

Re: Don't touch my clipboard

#43

The wrongest thing about this, from my perspective, is that my browser fires off a js 'copy' event when I press control-c. There are times when I've found it helpful that a browser can copy text to my clipboard when I click a button, but I can't think of a single time when I want a site to react to my attempt to copy text off if it. Is there any way to configure my user agent (Firefox) not to do this? A hack is ok.

> I can't think of a single time when I want a site to react to my attempt to copy text off if it. Any time you're not interacting with HTML text is a time it could be useful.

In that case there should be no actual text selected. The problem only occurs when there is text visibly selected and you press your copy shortcut. In those cases the only correct behavior is to copy the selected text.

Re: Don't touch my clipboard

#44
post #40

Earlier quoted context omitted.

I can highlight and ctrl+c without issue in their Writer clone. Never tried any others. I've only ever seen that setting fix sites that try to prevent you from copying.

I’ve used clipboard events for legitimate uses - for example I use them in this pseudo Turing sandpit / visual programming system to move, copy and export content: https://steam.dance/ (you can hold shift for a selection box and once selected you can copy, etc). But I wouldn’t be surprised if stuff like this is the exception rather than the rule. I feel like most news sites and blogs are improved with JavaScript disa…

You're getting far enough into JS knowledge that I don't have.

Do you actually need clipboard events, or just dom.event.contextmenu.enabled for that?

Re: Don't touch my clipboard

#45

I've been using a simple Javascript whitelist/blocker for the last 4 years or so (a dead-simple Safari content blocker for iOS and Mac I wrote myself; syncs over iCloud just to give me something to do) and I honestly don't know how anyone can stand the wide-open web without something similar. Using the web with free Javascript privileges is an utterly appalling experience. I can't stand it for more than 5 seconds.

I recently switched back to Chrome on mobile because I NEED the ability to blacklist JavaScript from abusive sites. Hacker News links, in particular, are infuriating without it.

I haven't found a way to do this in any of the Firefox versions available for Android.

My block list is mostly well known news sites.

Re: Don't touch my clipboard

#46
post #18

I agree and share the frustration. A stock Apple application "Books" does something similar as well. When copying text -- using keyboard shortcut or the context menu rendered as soon as you lift your mouse (another tragedy) -- your clipboard will look something like the following (2 lines): “ ” Excerpt From: . “ .” Apple Books. That gets written to your clipboard; quotes and everything.

as does the kindle app. it's come in handy once for me (in a comment to a hn post, ironically), but usually it's a nuisance.

Re: Don't touch my clipboard

#47

Earlier quoted context omitted.

It’s been around for so long a clipboard-jacking-as-a-service company, Tynt ( https://www.crunchbase.com/organization/tynt ), launched, lived and exited. If telling people not to do this was going to be enough to solve the problem, we wouldn’t still be talking about it. The browser vendors really need to shut it off once and for all.

And they have 100-250 employees?!

Most of them are probably in sales.

Re: Don't touch my clipboard

#48
post #5

There used to be a time when we could hope that browsers would put users first and disable dark patterns like these. Now, there are so many advertisers that use Tynt and related services to muck with copy/paste that it wouldn't surprise me if the major browsers are incentivized to leave this alone and let users suffer.

In Firefox this behaviour has been closed as WONTFIX for >10 years [1] and actually accepted for more like 20 years [2]. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=504748 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=39098#c23

I mean, there's a reason why it's WONTFIX, down in the 4th comment: https://bugzilla.mozilla.org/show_bug.cgi?id=504748#c4

Re: Don't touch my clipboard

#49

Is there a chrome plugin that prevents this?

as mentioned by others, on firefox you can set dom.event.clipboardevents.enabled to false in about:config, which prevents sites from being notified when you tried to copy something.

Re: Don't touch my clipboard

#50
This happened to me recently and it was pretty embarassing - I copied a two paragraph snippet from a psychology paper and the website put an ad for CBD oil in my clipboard above the paragraphs.

The segment I copied was just long enough that it overflowed my chat window so I had no idea the insertion was even there and I sent it as-is.

The recipient called me about two minutes later and said "hey, I think you've been hacked - you just sent me a CBD oil advertisement."

So yeah, I'd love to see user agents address this. If I push a copy button (like github's clone repo button) then fine, I'm at the mercy of their javascript. But if I copy via ctrl-C or a right click menu, it should not not let the page interfere.

Post reply on HN