Home | Looking for something? Sign In | New here? Sign Up | Log out

Monday, April 26, 2010

Disable Copy and paste

Monday, April 26, 2010

Disable Copy and paste

Thinking of a way to make it more difficult for people to copy the contents of your blog? Here's a neat little JavaScript that will disable Copy and Paste.

<!-- Disable Copy and Paste-->
<script language='JavaScript1.2'>
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function (&quot;return false&quot;)
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>

Insert the code between the <head> and </head> tag.

0 comments:

Post a Comment