Live data from Hacker News

How to control what is copy-pasted to and from the clipboard in the browser

taye.me

31–40 of 40 posts

Re: How to control what is copy-pasted to and from the clipboard in the browser

#31

This is neat... but why not use the copy/paste event handlers where possible?

Firfox doesn't fire paste events unless an editable element has focus. You would have to bring focus to an input element to make sure that an event is fired.

Re: How to control what is copy-pasted to and from the clipboard in the browser

#34

More important, how do I keep a site from changing what I copy / paste, because this is the crappiest UI change a site can make. I am rather sick of copying a phrase and getting a huge site advertisement and url attached.

how do I keep a site from changing what I copy / paste 1. Disable Javascript. I browse with NoScript / Scriptsafe plugs installed, and disable JS by default. This defeats the demo in the article (I actually had to enable JS to break my copy/paste). 2. Use a console-mode browser and/or curl the source and grab what you want from it (though I've found sites which break console tools). Better: enter domains which employ…

> Better: enter domains which employ such tactics in your /etc/hosts file as 0.0.0.0.

As far as I can tell, blocking *.tynt.com cuts down on 99% of such gimmmicky tactics.

(I wonder why they're such a major provider; the paranoid in me wants to believe that they're using patents aggressively; the lazy person in me doesn't care.)

Re: How to control what is copy-pasted to and from the clipboard in the browser

#35

Earlier quoted context omitted.

That is not a reasonable stance. What you're saying is that the site owner is entitled to pre-judge any copy and paste as inherently unfair, and break everyone's experience as a result. That's not a judgement they should be able to make, and it's not a right they have.

>>and break everyone's experience Come on. Appending a URL to the copied text doesn't break anyone's experience. It's a very tiny inconvenience at best. As for them pre-judging any copy and paste as inherently unfair, most people on the Internet copy and steal things without giving credit. Appending a URL to a chunk of copied text is a way of nudging them to cite the material. As for fair-use folks, I see it as helpf…

> As for them pre-judging any copy and paste as inherently unfair, most people on the Internet copy and steal things without giving credit.

You're justifying their pre-judgment of people by pre-judging more people.

> I always cite material I copy from elsewhere manually, but now the script does it for me. In either case, it's a win.

Citing material by leaving the "\n\nRead more at http://something.somewhere/content.html" isn't a format I've ever seen anywhere, and seems like it would be incredibly annoying to parse.

Re: How to control what is copy-pasted to and from the clipboard in the browser

#36

Earlier quoted context omitted.

how do I keep a site from changing what I copy / paste 1. Disable Javascript. I browse with NoScript / Scriptsafe plugs installed, and disable JS by default. This defeats the demo in the article (I actually had to enable JS to break my copy/paste). 2. Use a console-mode browser and/or curl the source and grab what you want from it (though I've found sites which break console tools). Better: enter domains which employ…

> Better: enter domains which employ such tactics in your /etc/hosts file as 0.0.0.0. As far as I can tell, blocking *.tynt.com cuts down on 99% of such gimmmicky tactics. (I wonder why they're such a major provider; the paranoid in me wants to believe that they're using patents aggressively; the lazy person in me doesn't care.)

What's your blocking method?

Short of setting up a nameserver and going authoritative for the domain (I've done that, I'm feeling lazy), /etc/hosts doesn't take wildcards for hostnames.

Re: How to control what is copy-pasted to and from the clipboard in the browser

#37

Earlier quoted context omitted.

That is not a reasonable stance. What you're saying is that the site owner is entitled to pre-judge any copy and paste as inherently unfair, and break everyone's experience as a result. That's not a judgement they should be able to make, and it's not a right they have.

>>and break everyone's experience Come on. Appending a URL to the copied text doesn't break anyone's experience. It's a very tiny inconvenience at best. As for them pre-judging any copy and paste as inherently unfair, most people on the Internet copy and steal things without giving credit. Appending a URL to a chunk of copied text is a way of nudging them to cite the material. As for fair-use folks, I see it as helpf…

> Come on. Appending a URL to the copied text doesn't break anyone's experience. It's a very tiny inconvenience at best.

No. It makes something that should be in muscle memory, which I shouldn't even have to think about, which I do countless times a day on other sites and with other tools exactly the way I expect, and forces me to stop and think about it. It breaks my concentration and breaks my flow. Sites which do this are broken. The site owners have reached out and purposefully chosen to make my tools misbehave. You don't get to tell me that's a "tiny inconvenience". Especially not when the reasoning behind it is so utterly asinine.

> most people on the Internet copy and steal things without giving credit.

I really, really hope you're trolling. Even if this bore the slightest, tiniest resemblance to reality, it wouldn't justify trying to break my tools. "There exists an infringing use case therefore all uses must be interfered with"? No. No. NO.

Re: How to control what is copy-pasted to and from the clipboard in the browser

#38

Earlier quoted context omitted.

> Better: enter domains which employ such tactics in your /etc/hosts file as 0.0.0.0. As far as I can tell, blocking *.tynt.com cuts down on 99% of such gimmmicky tactics. (I wonder why they're such a major provider; the paranoid in me wants to believe that they're using patents aggressively; the lazy person in me doesn't care.)

What's your blocking method? Short of setting up a nameserver and going authoritative for the domain (I've done that, I'm feeling lazy), /etc/hosts doesn't take wildcards for hostnames.

Hm, I must have just blocked the specific domain: tcr.tynt.com (as per instructions here: http://daringfireball.net/2010/05/tynt_copy_paste_jerks)

Re: How to control what is copy-pasted to and from the clipboard in the browser

#39

Earlier quoted context omitted.

What's your blocking method? Short of setting up a nameserver and going authoritative for the domain (I've done that, I'm feeling lazy), /etc/hosts doesn't take wildcards for hostnames.

Hm, I must have just blocked the specific domain: tcr.tynt.com (as per instructions here: http://daringfireball.net/2010/05/tynt_copy_paste_jerks )

NB: that's a hostname, not a domainname.

Re: How to control what is copy-pasted to and from the clipboard in the browser

#40

Earlier quoted context omitted.

Hm, I must have just blocked the specific domain: tcr.tynt.com (as per instructions here: http://daringfireball.net/2010/05/tynt_copy_paste_jerks )

NB: that's a hostname, not a domainname.

Ack; I should have known that. Thank you.
Post reply on HN