Unordered List

Thursday, July 4, 2013

How To Add Automatic Link Source When Others Copy A content From Our Blog

Friends, Now i share a secure system to protect your content. Some peoples try to copy our blog content without permission, You can restrict it with some java code like right click protection, copy protection etc. But some bloggers cant do that, because they provide some codes to peoples. If they apply that scripts visitors cant copy anything from blog. Now i share a trick for some tricky way to restrict copy from blog. This code help to add automatic link source when others copy a content from our Blog.. You can add this lik to your blog. Please follow below instruction… enjoy with Master Hacks

Log in to your Blogger account

  • Go to Design option--> Edit HTML

  • Find (CTRL+F)  </head> tag.

  • Copy the below code, and paste it above </head> tag.


<script type='text/javascript'>
function addLink() {
    var body_element = document.getElementsByTagName('body')[0];
    var selection;
    selection = window.getSelection();
    var pagelink = "<br/><br/> Original Content from: <a href='"+document.location.href+"'>"+document.location.href+"</a><br/>Copyright © Techtoones"; // change this if you want
    var copytext = selection + pagelink;
    var newdiv = document.createElement('div');
    newdiv.style.position='absolute';
    newdiv.style.left='-99999px';
    body_element.appendChild(newdiv);
    newdiv.innerHTML = copytext;
    selection.selectAllChildren(newdiv);
    window.setTimeout(function() {
        body_element.removeChild(newdiv);
    },0);
}document.oncopy = addLink;
</script>

  • Change RED colour with your own words.

  • Save it..



Enjoy ………………………

0 comments:

Post a Comment