Code To Disable Right Click in Blogger Blogs to Protect Source Code



Disable mouse right click button function in blogger pertaining to secure you image or source file.

You may have seen in some webpage whenever you click right button of mouse an alert message box show message “function disable” and right button click not show function (Option) like copy past etc…

You can also Disable right click function within your blog or website you just need a little “javascript” which

is below given.

How to web page disable right click function (Option) in blogger’s Blog:
Disable Right Click
Just follow below step for Disable mouse right click function (Option).

1)Sign in - in your blogger account

2)Select your Blog in which blog you want to Disable right click function.

3)Go to Layout Option.

4)In Layout option there is an Add Gadget Option Select this (see below demo image)

5)After select Add Gadget a popup window will be open

6)Now select “HTML/JavaScript” Gadget.

7)Now add below HTML Script in Content Box.

Code:
<script language=javascript>
var message="Function Disabled!";
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>

8)Now press Save Button after save press Save Arrangement Button on layout page.

9)Now check your blog Mouse right click function is disable in your blog.

0 comments:

Post a Comment

After your comment subscribe to our blog to get the latest SEO Hints which are discovered recently in SEO field