Suite101 uses a third-party service called Tynt .
Tynt's code snippet is located at http://tcr.tynt.com/javascripts/Tracer.js
I have researched the source for you (with some help, an online JavaScript decoder ).
So here is what happens:
- code is activated on events such as mouseup, mousedown, and copy (in the
startListeningForTraces function) - If the user has selected a range of text, then he:
- Creates HTML for attribution links plus an additional CC license URL
- Adds this HTML to the selection, placing it at the zero size of the
<div> (so that it is invisible on the screen) - reports that it was copied back to the Tynt servers.
Tynt code does a great job to make this work seamlessly in browsers.
Anirvan Jul 30 '09 at 19:18 2009-07-30 19:18
source share