In many popular websites, when you copy the content and paste it to somewhere, it adds a link back to the original page with copyright notice. This helps content owner to protect content. Actually there are many content scrappers who create blog on blogger or WordPress.com and produce content by copying from other websites. So adding a copyright notice helps to get link back from these copy bloggers.

Here I’m going to share a  JavaScript code that can add link back to original website with a copyright notice. This can help you to protect your website content. This JavaScript code will work on all platforms and all kind of websites. Bellow is the javascript Code, Copy code and add this to your website just above the </body> tag.

<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 &Copy; Trixhub.Com"; // Change This To A Custom Copyright Message 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>

2 COMMENTS

Say Something About This Post: Don't Spam