Script to disable mouse right click function

How to disable right click function of mouse from web pages?

Pages are generally copy righted on the Internet but there’s still probability to steal text or images from the websites. This may lead to dropping from search engines stats when it comes to duplicate content policies. People may not be using exactly what you have written but at least it may cause to draw search engine crawlers to duplicate but a little altered pages. Same goes for images that we generally put to demonstrate our messages more clearly. These images may also be the victim of those content cheaters. Apparently these can only be saved through copyright policies but up to some extent.

Another and additional functionality that at least put the cheaters in some trouble to copy contents is to put a certain script that disables the functionality of mouse right click where people generally use this option to copy web page contents. So, below is the code that will make your page safe from cheaters.

Instructions to copy this Script:

1. Double click your mouse on the start of the script, hold and then drag your mouse to select all script down to the bottom of the page.

2. Then press Control+C to copy the code.

3. You can then place the below code within the <body>  tags.

<script>

<!–

// Script to disable mouse right click

//Presented by The Media Annexes ([email protected])

//For any further queries or questions, visit https://www.themediaannexes.org

var message=”Function Disabled!”;

///////////////////////////////////

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>