Disable right click on your blog



Do you want to disable right click on your blog or site???
it is quite easy with java script and one more thing that you can put any message when somebody right clicks on your site's link..
For Example you might have seen this message on some site when you clicks right of your mouse,
"this blog is use copy scape technology we can track you"
like this message you can see this thing on this site also.
now i am going to tell you that how to disable right click.
First of all copy the following code:



<script language="JavaScript">
<!--

//coded by BeingGeeks
// http://www.beinggeeks.com

var message="function disable!";

////
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>


and paste this code to
Now go to Design --> page element--> add a gadget--> HTML/ Java Script.
now save it and you can see the message on right click that function disable
you can change this message simply in this code and put any message.

Enjoy the trick....

0 comments:

Post a Comment