Add “Read more” links to text copied from your website
Add a Tynt-style “Read more” link when people copy text from your website.
In 2009, a company called Tynt introduced a free service whereby website owners can add a “Read More” link to the bottom of text copied from their web pages.
Utilising a simple JavaScript, the controversial copy-paste modification utility works as follows:
- A user highlights some text on a web page and copies it, either by pressing Ctrl + C or via the browser menu.
- The Tynt JavaScript records the text that has been copied and sends it to Tynt for analytical/statistical purposes on behalf of the website owner.
- The Tynt JavaScript adds a “Read more” link to the bottom of the clipboard buffer containing the page URL, plus a unique code. (For example: “Read more: http://code.adonline.id.au/add-read-more-links-to-copied-text/#ixzz1aSokO3X3”
- When the user pastes the text, the “Read more” link is appended to the end.
- If the copied text is inserted into an email or reposted on another website verbatim and people click on the link, data will be sent to Tynt tracking the re-published information.
- Tynt forwards usage data to the website owners, who gain a better understanding of what content visitors are interested in.
The Tynt service seems to be very popular with newspaper and publishing websites where plagiarism could be a concern.
Implementing a “Read more” script on your site
If you want site analytics, you can sign up with Tynt.
Otherwise you can set-up your own Tynt-style “Read more” script that doesn’t rely on third parties. This solution doesn’t provide analytics nor use Tynt code. Rather it’s a simple implementation that provides a “Read more” hyperlink at the bottom of text copied from your website.
Several scripts have been written to add this function to websites, but I have been unable to find one that works on both Internet Explorer and non-IE browsers.
The solution I have found is to add two scripts to each page; one for Internet Explorer and one for Firefox/Chrome/Safari/Opera. (Combining these scripts into a single .js file breaks functionality).
Step 1: Get jQuery
The script for use on Internet Explorer requires the jQuery JavaScript library. If your site isn’t using jQuery, download the latest minified ‘production’ script, upload it to your server and add the following link to your <head>.
<script type="text/javascript" src="http://www.yourwebsite.com/jquery.js"></script>
If your site already utilises jQuery, ignore this step.
Step 2: Download the JavaScript files
Unfortunately two scripts are required to provide function in Internet Explorer and non-IE browsers. They do work well in tandem:
- For Internet Explorer: I have chosen to use the Copy & Paste Hijacker v.1.9.1 by dynamicplus, which relies on jQuery.
- For other browsers: I have chosen to use the Copyright Notice script by c.bavota.
You can download the scripts for use from their respective sites. To make things easier and ensure scripts load faster, I have minified them and bundled them into a single ZIP file which you can download here:
copytext.zip
Step 3: Site implementation
Unzip the file, and upload the two files to your website via FTP. Then ensure the following code is added to the page <head>:
<script type="text/javascript" src="http://www.yourwebsite.com/jquery.js"></script>
<script type="text/javascript" src="http://www.yourwebsite.com/jquery.copytext.min.js"></script> <!-- For Internet Explorer -->
<script type="text/javascript" src="http://www.yourwebsite.com/copytext.min.js"></script> <!-- For non-IE browsers -->
It’s essential that the reference to your jQuery script comes first.
Now when you copy and paste text from your website, you should see a “Read more” link at the bottom.
Comments
28 responses to “Add “Read more” links to text copied from your website”
Thanks Adam! I was looking for an alternative to Tynt, and this did the trick.
The good news too is that for those enterprise people, you can add events and things like Omniture tags to the copy action. You can also break it out to add a special “read more” based on a content areas users may copy from. IE: for more recipes visit, learn more about the author at…
i have just downloaded Copy & Paste Hijacker from jquery’s
and seems to be crossbrowser, so there is no need to have two separate js!
Mark,
Which browsers did you test Copy & Paste Hijacker in?
hi
currently i have two computer.
on mac it worked with safari, chrome and firefox.
on windows7, i tried on internet explorer, chrome and firefox.
i have tested it on demo page provided by plugin @ http://e.xplo.it/jquery/cp.html
Hello Mark,
Having studied the code, it appears it has been modified since I wrote my blog post on 11 October 2011. I agree, it now works in IE9 and Firefox 7.
Please update this post. The plugins page at jquery.com has been down for a couple months now.
Could you please edit the plugin so that it works for IE9 And Firefox?
i downloaded the new Copy & Paste Hijacker but i dont now how to modify it.
I am trying to use Tynt is my website.. Hope it will work fine for my blog..
I wish it was including images also (like when someone copied IMG url in your page.)
And, I can’t find updated version of Copy & Paste Hijacker in jquery.com which mentioned by mark82. It’s a broken url. If you have that version, could you upload it here since IE code is not working nowadays.
Thanks for nice post.
It is probably sufficient to add
charset=”iso-8859-1″
when including jquery.copytext.min.js to make it work in everything but Opera.
Hey, great article. I have made something similar that you might like to check out. You can add anything you wish to the copied text, its a jQuery plugin found on code canyon.
The link is: http://codecanyon.net/item/jquery-copy-inject/3537749?ref=awgeorge
Thanks it works well on http://www.naijafinder.com
Although not a way to prevent people from copying your content, this code clearly makes people think twice before they do.
Therefore, I’m seriously thinking about getting my webmasters to implement this on my own website.
Thanks for sharing the tip.
THANKS!!!!
Script won’t work in IE 10
thanks!
I wanted to try this but noticed that Copy & Paste Hijacker v.1.9.1 by dynamicplus is no longer available online. Fortunately Adam provided a zip containing the files. I installed these files and it worked perfectly on IE 10, Firefox and Chrome.
Thanks Adam!!
Hey I want to use it on Explore Youth, Can you tell me which is better custom one you provided above or tynt?
Adam, what category of risk/reward do you think using Backlink Builder 1.0 by Scriptilicious would be in? I’m thinking about using it on my site but am somewhat hesitant about it. Can you comment on this tool?
Has some text been removed from this article? After: “Then ensure the following code is added to the page :” There is nothing?!?
Code is restored to the page. A minor reformatting problem caused it to disappear.