Search This Blog

3 Jul 2015

How to disable images right click in Blogspot / Blogger ?

Tutorial [教程] • 3 JULY 2015
Browse your favourite photos and save an image by right click the image then click the " save as ". Now I want to protect my pictures from the website. You can disable right click by following the tutorial below : 


1. Sign in –  in your blogger account
2. Go to Layout
3. Click Add a Gadget
4. Click on HTML/JavaScript (picture below)


5. Copy the code below and paste in the HTML/JavaScript 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>

6.  var message="Function Disabled!"
You can change to your own message. Optional


7. Click the Save Button. Refresh your page
Check your blog you should be able to see the function is disable in your blog. 

Credited to Allbloggertips


1 comment:

Template developed by Confluent Forms LLC; more resources at BlogXpertise