1

Disable mouse right click button function in blogger for protect you image or source file.


You may have seen in some webpage when 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 in your blog or website you just need a small “javascript” which is below given.

How to disable mouse right click function (Option) in blogger’s Blog.

Just follow below step for Disable mouse right click function (Option).

Sign in –  in your blogger account

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

Go to Layout Option.

 In Layout option  there is an Add Gadget Option Select this


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

 Now select “HTML/JavaScript” Gadget .


  • Now add below HTML Script in Content Box
HTML Script (Copy and Paste) in HTML/JavaScript Content box


--------------------------------------------------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------------------------------------------------

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

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

Thanks I Hope You Like This Post!

Post a Comment

  1. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work. change management courses

    ReplyDelete

 
Top