Useful JavaScript code snippet to save your website content from being copy-pasted!

Are you annoyed with bloggers who simply copy paste content from your site and publish it as their own? Then here’s a small yet powerful piece of Useful JavaScript code snippet, which would bring you some relief!


< script language = "JavaScript1.2" >


function disabletext(e){
return false
}

function reEnable(){
return true
}

//if the browser is IE4+
document.onselectstart=new Function (“return false”)

//if the browser is NS6
if (window.sidebar){
document.onmousedown=disabletext
document.onclick=reEnable
}

Once you embed this code snippet into the HTML body of your blog or website, and you would find that your visitors can no longer select the text-content put up on the website.

This should make it tough for the plagiarism lovers to re-use your content, however there are obviously other ways to get around with this, just as there's always a way out!

More details on http://code-maniac.blogspot.com

To find more code snippets in JavaScript, HTML, PHP, MySQL, PL/SQL and forms of Free Online Programming Tutorials Click Here

Related posts:

  1. C code snippet to generate Kaprekar’s magical constant 6174
  2. C# code snippet for demonstration of data casting!
  3. Fixing the IE EMBED, OBJECT and APPLET Problem: Dynamic Embedding with JavaScript
  4. HTML Code for Redirection
  5. A handy C-code snippet for all the programmers…

Filed Under: Internet

About the Author

Om is a dynamic entrepreneur, renowned author, and founder of Webfosys Networks Pvt Ltd that provides IT, content creation, SEO & Website Design services to several clients across the globe. He has written over 12,000 articles, and loves to write Latest Tech Reviews. Reach him 24/7 - om.thoke86@gmail.com

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.