Related Posts Plugin for WordPress, Blogger...
Custom Search

Sunday, August 21, 2011

Script to Display The Name and Title of The Article After The Copy

Our discussion this time about the script, which at the time of our article in the copy and paste, the script will display the title and the name of our blog in an article in the copy and paste it. I am sure many may already know this script, but there is no harm in sharing the material we make as we are this time.

This is the following steps:

  • Log in to Blogger with your Google Account
  • Go to Design --> Edit HTML
  • Insert the following script after the code  <head>

<script type='text/javascript'>
function addLink() {
    var body_element = document.getElementsByTagName('body')[0];
    var selection;
    selection = window.getSelection();
    var pagelink = "<br/><br/> Read more at: <a href='"+document.location.href+"'>"+document.location.href+"</a><br/>Copyright Under Common Share Alike Atribution"; // change this if you want
    var copytext = selection + pagelink;
    var newdiv = document.createElement('div');'absolute';'-99999px';
    newdiv.innerHTML = copytext;
    window.setTimeout(function() {
}document.oncopy = addLink;

  • Replace the URL on the script with the URL of your blog.
  • Save the template.
  • Done.

If you perform the steps above correctly then try the test on your blog, your own copy of the article continues to put in notepad. And then what happens, there's your blog URL in the article at the bottom.
But there are drawbacks of this script, when to turn off javascript in their browser, this script will not work, and I am sure this script has a lot of blogger who know it especially reliable.

Good luck. Even if there is something wrong, please comment how to be better.

Do you Like this Post ?

Get Free Email Updates Daily!

Follow us!

Free Sitemap Generator

0 Comment:

Post a Comment

Do you like this post? Give your comment...

Subscribe to Posts (Atom)

Add to Google Reader or Homepage

Subscribe in Bloglines

Subscribe via Email

Get Tweets!

Return to Top