Avaricesoft’s Weblog

Just another WordPress.com weblog

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>

4 Responses to “Disabling Right Click and CTRL + C Combination in Blogger”

  1. Rob said

    I can’t get this to work for me. I’m using Vista and the latest browsers. I can select text, right click, copy, use ctrl-c, etc… Any thoughts?

  2. serban said

    is much easier, Rob: use the following snippet:

    that’s all ;)

  3. batcha said

    I can’t get this to work for me too.
    Please help

  4. XML error message: Open quote is expected for attribute “{1}” associated with an element type “language”. this error is coming on saving XML.
    PLZ EPLY IF YOU FIND SOL TO THIS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>