Blogger Right Click Blocking & Text Copy Blocking Codes


Blogger Right Click Blocking & Text Copy Blocking Codes

Blogger Text Copy Blocking

Hello friends, if you have shared content on your Blogger blog and don't want it stolen by others, you are reading the right article.

To prevent the copying of the articles on your site, it will be sufficient to place the following code between the "<head></head>" tags of your site.

<script type="text/javascript">
//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}

</script>

Blogger Right Click Blocking

To block users from right clicking when they enter your site, it will be sufficient to write the following code between the "<head></head>" tags of your site.

<SCRIPT LANGUAGE="Javascript"><!--
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;

With such simple methods, you can prevent users from stealing content from your site, at least for entry-level users. But remember, users do not like such restrictions and it may reduce your site's visitor rate.