1.31.2012

Right Click Disable

As a blogger and blog designer the content on my blogs is very important to me. When I designed Tammy's blog I decided that maybe it was time to learn how to make sure that nobody can steal the photos or design content of a blog. To do this you have to right click disable the blog. The thing about doing this is that it doesn't only right click disable the pictures. It disables all of the content on the blog. The only thing that you may not like is that this means that someone won't be able to right click, and open links in a new window. Everything on your blog still works perfectly though. If you are interested in doing this then follow these directions!






First you will go to the layout page of your blog by going to the little tab beside new post and going down to the layout option!







Now you will go in and click to add a gadget. Then scroll down until you see the HTML/Javascript gadget and click the plus sign to add that!





Now you will do some simply copy and pasting into that box! You leave the title for the gadget blank and paste the following code into the box:


<script language=javascript>
<!--

//Disable right mouse click Script
//By Being Geeks
//For full source code, visit http://www.beinggeeks.com

var message="OOPS! Sorry,right click isn't allowed!";

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


Do you see where it says "OOPS! Sorry, right click isn't allowed!"? You can put whatever you want it to say when someone tries to right click your blog into that spot. But make you that you leave the quotations or it wont work!
I hope this works for you! If there are any issues at all just comment or email me and I will help you in any way that I can!