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:
- C code snippet to generate Kaprekar’s magical constant 6174
- C# code snippet for demonstration of data casting!
- Fixing the IE EMBED, OBJECT and APPLET Problem: Dynamic Embedding with JavaScript
- HTML Code for Redirection
- A handy C-code snippet for all the programmers…
Filed Under: Internet
