Skip to main content

No Copy and Paste Script

Did you know that you can disable the copy and paste function on your web pages? 
   This little JavaScript snippet will prevent someone from highlighting your text
 and using the copy function to copy it and rip it off. It also prevents them 
from using Ctrl + A to select all the text, or using the right-click menu to
 Select All.

It doesn't work if the visitor has JavaScript 
disabled or has a browser that doesn't support JavaScript. That isn't very many
 users, but anyone with some experience would know a way around this trick. It 
will stop most new users though, and at least make it harder for everyone else.
 
Just add the following code to the HEAD tag of your web page: 
 

<script type="text/JavaScript">
function killCopy(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=killCopy
document.onclick=reEnable
}
</script>
 
-It will make right click copy protect, select copy protect, etc.  

Comments