More than words

Simple words from me. A good tuto is not about nice and sweet. Its about simplicity and understanding. Think about it!

Thursday 16 June 2011

How to Disable Right click? (Prevent copy cat)


1. Copy this code.

<script language="JavaScript">
<!-- 
var message="NO COPY CAT ARE ALLOWED!!!"; 
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
} 
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
} 
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
} 
document.oncontextmenu=new Function("alert(message);return false") 
// -->
</script>



 2. Login to Blogspot. Go to Design and click Page Elements. Next, click add gadget and choose HTML/JAVA SCRIPT.
3. BEFORE you save, please edit the code that i've highlighted above. Put any words that you like to appear when copy cat occurs.
4. Now, click Save, and done!:)

1 comment:

  1. Nani?? Only right-clicking?? I thought ur gonna have something better than that....I can use this instead (CTRL+C) and use (print screen)....omae wa aho da na??

    ReplyDelete

Copyright©Its mine! The kine kine. Do ask first before use my tools