Simple method to disable Right Click on website


Simple method to disable Right Click on website

In this, tutorial we are Going to see about disable Right Click on website one of My Friend Running Movie review website his blog Contents and Images are Copied by Other’s it will affect our Blog SEO Badly.most of them copy and spinning the Content.Here is the Solution for disable Right Click on Website and Blogs By Adding Simple jQuery Script.

jQuery Script to disable Right Click on your website

  • Copy the Below script and paste before </body> Tag

<script>
(function ($) {
$(document).bind('contextmenu',function(e){
e.preventDefault();
});
$(window).unbind('keypress').keypress(function(event) {
if (!(event.which == 115 && event.ctrlKey))return true;
event.preventDefault();
return false;
});

}(jQuery));
</script>

  • If you are in Blogger Platform Just log in to your Blogger Dashboard go to Template and Open template editor Paste the Code just above the </body> tag
  • If you are a WordPress Install Insert Header and Footer Plugin Paste it on Footer code Box.Most of the Themes Comes with Insert header and Footer code Box Feature Example Mythemeshop WordPress themes
  • if your website is Custom Designed Means Check Whether your website having a jQuery Plugin Script or Install it Just copy the Below jQuery Plugin script and paste before the </head> Tag

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

  • That’ all Successfully we disable the Right Click on our website 🙂

Updated

In the above script you can Disable the Mouse Right Click only But this Full updated Script Help you to Disable the Right Click, Text Selection and key Board Control


<script type="text/javascript">
if (typeof document.onselectstart!="undefined" ) {
document.onselectstart=new Function ("return false" ); } else{
document.onmousedown=new Function ("return false" );
document.onmouseup=new Function ("return true" ); }
</script>

<script>
(function ($) {
$(document).bind('contextmenu',function(e){
e.preventDefault();
});
$(window).unbind('keypress').keypress(function(event) {
if (!(event.which == 115 && event.ctrlKey))return true;
event.preventDefault();
return false;
});

}(jQuery));
</script>

This Script will Help you to Protect your Blog Images and Contents From Theft and Copying.

If you Need Any Help Means Please Feel to Comment here our Team will Help you.


Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com



11 Shares
+12
Tweet
Share8
Pin1
Stumble