I got a bit annoyed with NoScript last week due to the continous white-listing while randomly surfing the web, so I reluctingly decided to pick the dangerous Allow Scripts Globally option. However, this has introduced me to an annoyance far greater and that is: websites overriding copy/paste functionalty using JavaScript.
Yes, this is actually possible and quite easy because all one has to do is register an event handler for the onCopy event. The sites I’ve stumbled upon so far are using it to add some text like “Read more at …”.
This is extremely annoying because it breaks my workflow in several situations, not limited to:
- When I want to search the web using the copied text: I will first copy the text (Ctrl + C) and then paste it into the search box using (Ctrl + K and Ctrl + P) (possibly adding more search terms).
- When I want to copy the text for use in a blog post (like this one).
If you don’t understand why this is annoying, you just don’t get it.
So for now I’ve enabled NoScript again, but as NoScript whitelists domains it means some websites might still slip through the cracks. If I get annoyed enough I might look into the possibility of removing attached event handlers using JavaScript injection (e.g. through GreaseMonkey).
I’ve been running NoScript in “Allow Scripts Globally” mode lately and now I just noticed that SongMeanings.net blocks copying aswell. They also try to block selection and context menu but this doesn’t work for me.
The guilty script is: http://www.songmeanings.net/javascripts/songprotection.js
Song protection? This is idiotic. In this particular case, I just wanted to look up the translation of the lyrics for a specific song. But even if I wanted to copy the lyrics outside of SongMeanings.net, who gives a shit.
To get around the “protection” I simply blacklisted SongMeanings.net in NoScript so this script wouldn’t execute. Thank $DEITY for the open web.