1 comments

Disable Right Click on Blog - A Blogger Hack

17 February, 2008

I know many Blogger don't like to get there unique content copied by any other blogger.
SO now don't worry about getting your content copied here is a solution.
By this Hack users of your blog cannot right click on your blog and your content remains safe :)

This widget is very simple to install into your blog
Following are the steps

Step 1 > Go to Template -> Page Elements.
Step 2 > Add a Page Element -> then Add a HTML
Step 3 > Now just copy and save the following code into Html and you are done !


<script language='JavaScript'>
<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="No Right-Click!";

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

Enjoy this hack !!!

1 Responses:

Rohit Dhawan Says:

This works.. buttt.. anyone can still use Ctrl + C to copy text! How to disable that?