The collection of many electronic circuits and electronic projects that easy to build with PCB layout for the hobbyist and study.

How to Disable Right Click Context Menu on Blogger

No comments
Blogs with good quality content, unique images and icons have been facing a serious problem of violation of copyright for quite a sometime. The content, pictures, icons or any other thing on your blog is your property and you have all the rights to protect it. You need to take some serious steps to prevent your blog’s content and other things from being copied. The best and effective measure is to disable right click on your blog.


How to Disable Right Click Context Menu on Blogger
If you do this none will be able to copy any image or icon from your blog by right clicking on it. If someone tries, a pop up will appear with an error message. This is really a useful trick to protect your images and icons from copycats. It is an easy trick and you will just have to add a piece of JavaScript. Follow the steps below.

1: Go to Blogger and sign in

2: Select "Layout" from drop down menu, click "Add a Gadget" and select HTML/JavaScript Widget

3: Now copy the below code and paste inside HTML/JavaScript

<script language=JavaScript>
<!--
var message="Sorry right click is 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>

4: Save the widget and view your blog. Right click somewhere on your blog and you'll see a pop up box saying "Sorry right click is disabled!". Now your images and icons are safe from copycats.

No comments :

Post a Comment