How to Disable Right Click on your Website

Last updated on May 5th, 2018 at 02:44 pm

Are you tired of watching your contents being distributed on the internet by your readers? I’m going to show you how to disable right clicking in your blog.
follow the simple steps I’m going to show you: Simply post this code anywhere in your <body> section.

<script language=JavaScript>
<!–

//Disable right mouse click Script
//By Ebenezer ([email protected])
//For full source code, visit https://eobasi.com

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”)

Did you get the answer you were searching for?

Save hours of searching online or wasting money testing unnecessary plugins, get in touch with me and let's discuss a suitable plan for your project. Best thing about this service is that you are never placed on hold and get to talk to an expereinced Oxwall/Skadate developer.

Get Answers for Free!

Ask a question related to this topic and get immediate answers from other community members in 48hrs or less. Contribute by answering members questions.

Ask Question
Premium Service

Whether it's a custom plugin, theme or dedicated support needed to get you started on your project, get professional 24/7 support tailored to your need.

Get in Touch

Or just leave a comment...

// –>
</script>

    Leave a Reply