0

I spent a lot of time with thinking and searching for the solution how to append the source URL address (my sites) to the user's clipboard when he presses Ctrl+C and copies some text from my site.

These sites (for example) use it:

Could you give me any hint where to look for more information?

Ry-
  • 199,309
  • 51
  • 404
  • 420
Martin Lunak
  • 271
  • 1
  • 4
  • 12
  • possible duplicate of [How to Copy to Clipboard in JavaScript?](http://stackoverflow.com/questions/400212/how-to-copy-to-clipboard-in-javascript) – Quentin Dec 11 '11 at 19:35
  • 5
    I hate it when websites do that. Please don't. All everyone does is take it off. – Ry- Dec 12 '11 at 05:04
  • Time.com does this when you try to copy a quote from a story. It was actually useful that one time, because I didn't have to go back and get the URL to the story. But it's usually very annoying. – Jared Farrish Dec 12 '11 at 05:07
  • I have found tynt.com (Times.com also uses it); however it appends # + some hash to my URL, so I am afoaid of some typo of injection. – Martin Lunak Dec 12 '11 at 14:20
  • Comment: Tynt does not work (for me) in Opera Browser. – Martin Lunak Dec 12 '11 at 19:44
  • Don't confuse data with metadata. The user copied data. Leave it at that. There are tools available for users who want do do more with copy/paste, and those tools know how to get the metadata and present it to the user in a useful manner. It is not for you to decide. – Chris Thornton Dec 13 '11 at 21:41
  • There is an [`oncopy`](https://developer.mozilla.org/en/DOM/element.oncopy) event, but I don't think you can modify the copied text. – Rocket Hazmat Jan 26 '12 at 19:49

0 Answers0