Avaricesoft’s Weblog

Just another WordPress.com weblog

Archive for July 18th, 2008

Disabling Right Click and CTRL + C Combination in Blogger

Posted by avaricesoft on July 18, 2008

Content thieves are increasing day by day , they copy your content and change some words in it , use a few SEO tricks and make Google bots perceive the stolen content as original one , and their blog appear before yours on search results , yeah its that easy ,and this situation annoys every web master , but with a JavaScript code we can prevent thieves from copying our content .

With this JavaScript code , nobody will be able to click right on your site and since they cannot select the content CTRL + C combination will not work:

Copy the java codes below , before </body> tag without expanding template.

<script language=’JavaScript1.2′>

//Disable select-text script (IE4+, NS6+)- By Andy Scott

//Exclusive permission granted to Dynamic Drive to feature script

//Visit http://www.dynamicdrive.com for this script

function disableselect(e){

return false

}

function reEnable(){

return true

}

//if IE4+

document.onselectstart=new Function (&quot;return false&quot;)

//if NS6

if (window.sidebar){

document.onmousedown=disableselect

document.onclick=reEnable

}

</script>

<script language=’JavaScript’>curPage=1;

document.oncontextmenu = function(){return false}

if(document.layers) {

window.captureEvents(Event.MOUSEDOWN);

window.onmousedown = function(e){

if(e.target==document)return false;

}

}

else {

document.onmousedown = function(){return false}

}</script>

Posted in Blooger | Tagged: , , , , , , , , | 4 Comments »