Saturday, May 7, 2011

DISABLE RIGHT CLICK IN BLOG

You’ll need to add new "html/javascript" element to your layout.
Now go to your blogger account.
Navigate to Layout >> Add a GadGet >> and select html/javascript
Then copy the next code and past in in html/javascript text box area
Then save the html/javascript. and view you blog.

Now
When you try to do right click. a message will tell you that “Function disabled Because Of CopyRight
and if you want to change this words” Function disabled Because Of CopyRight”
find the next line in the codevar message="Function disabled Because Of CopyRight";
and change Function disabled Because Of CopyRight to what ever you want.
i hope it helps.

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

var message="Function Disabled Because Of CopyRight";

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>

No comments:

Post a Comment