How to Add Copyright Notice to Copied Text With a Script

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>

Related articles

Best Selling Products

Sale!

15000+ ChatGPT Prompts to Boost Your Business

Original price was: ₹2,500.00.Current price is: ₹99.00.
Sale!

900GB+ Premium Graphics Assets Bundle- All Editable Files

Original price was: ₹84,000.00.Current price is: ₹990.00.
Sale!

CorelDRAW 2024- Vector Illustration & Graphic Design Software

Original price was: ₹54,000.00.Current price is: ₹899.00.
Sale!

35000+ Festival & Business PNG Images Biggest Bundle

Original price was: ₹29,000.00.Current price is: ₹3,000.00.
Abhay Pratap Singh
Abhay Pratap Singhhttps://www.itechcube.com
Abhay Pratap Singh is Digital Entrepreneur, Who is Making Money From the Internet since 2012. He Also Works as a Freelancer and Does Web and Mobile app Development. Apart from That, He Invests in Stock Market and Crypto Currencies. Here in iTechCube, Writes about Blogging, WordPress Guides, and Tutorials to help begginers.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Select your currency
INR Indian rupee