views:

293

answers:

1

I have seen a few threads explaining that Flash can be used to set the clipboard data in Mozilla and Internet Explorer, it's easy, etc.

For example http://stackoverflow.com/questions/316508/greasemonkey-javascript-copy-to-clipboard-button

However, I would like to read the clipboard and remove certain items before setting it. Is there any way to do this?

So.. Is it possible then to detect whether copying and pasting is occuring? Then redirect them to another URL?

+3  A: 

Reading the clipboard is a pretty big security issue. Even if you can do it, it's not considered a friendly tactic, and I would advise against it, especially if you plan on changing it.

Alex Sexton
+1 — IE is the only browser I know of that ever let you do this, and I think even they are backing away from it now.
Robusto
yep i realise this, i guess its a subjective thing. I want to replace one character if someone copies my url.
Ke
then how come the script above allows you to set the clipboard in mozilla?
Ke
It uses flash - there isn't a solution for this in javascript. That's what the chosen answer says in the first sentence. If someone wants to copy your url, they should be able to, that's how computers work.
Alex Sexton