How to Disable Right Click On Blogger Blogspot using Java Script

How to Disable Right Click On Blogger and WordPress using Java Script

Using one of the below mentioned java script, you can disable the Mouse Right Click option on your blog / Web Pages.

For Blogger BlogSpot:

1. Go to your blogger Dashboard -> Template -> Add a Gadget -> HTML/JavaScript
2. Paste one of the below code and save the Gadget ( No need to mention any title)

Disable Right Click in Blogger

How to Disable Right Click On WordPress:

Log-in to WordPress Dashboard
Go to Appearance -> Widgets -> Add new Text Widget
Past one of the below code and save the Widget as shown below.

wordpress Disable Right Click

Disable Mouse Right Click Java Script (Without Alert Message):

<script language=JavaScript><!-- //Disable right mouse click Script - No alert // http://nxwiki.blogspot.com var message=""; function clickIE() {if (document.all) {(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} document.oncontextmenu=new Function("return false") // --></script>

Disable Mouse Right Click Script (With Alert Message):

<script language=JavaScript>//Disable right mouse click Script // http://nxwiki.blogspot.com var message="Right Click 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>

11 thoughts on “How to Disable Right Click On Blogger Blogspot using Java Script

Leave a Reply to Nesrine Gamal Cancel reply

Your email address will not be published. Required fields are marked *