06 January 2010

How to stop visitors from stealing your blog content

Below is a little trick that will stop your visitors from copying and pasting your blog information. Anyone with experience may know a way around this trick. However it will make it hard enough to discourage them and get them moving on to easier targets.

What to do?

Log in blogger / Dashboard > Layout > Add Gadget > HTML/JavaScript > copy the code below and past in in HTML/JavaScript text box area

<div class="codeview">
<script language="JavaScript">
<!--  &nbsp; 
//Disable right mouse click Script 
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive 
//For full source code, visit http://www.dynamicdrive.com  &nbsp; 
var message="Function Disabled!";  &nbsp; 

/////////////////////////////////// 
function clickIE4(){ 
if (event.button==2){ 
alert(message); 
return false; 

}  &nbsp; 
function clickNS4(e){ 
if (document.layers||document.getElementById&amp;&amp;!document.all){ 
if (e.which==2||e.which==3){  alert(message);  return false; 


}  &nbsp; 
if (document.layers){ 
document.captureEvents(Event.MOUSEDOWN); 
document.onmousedown=clickNS4; 

else if (document.all&amp;&amp;!document.getElementById){ 
document.onmousedown=clickIE4; 
}  &nbsp; 
document.oncontextmenu=new Function("alert(message);return false")  &nbsp; 
// -->  
</script></div>

When someone will try to do right click a message will appear “Function disabled” , you can change this message too if you wish.

0 comments:

Post a Comment