How to Disable Right Click using JavaScript blogger Pictured Steps

0

 

How to Disable Right Click using JavaScript Pictured Steps:

Normally, most blogs keep the right click option enabled to let their users navigate, copy, print, save and reload their web pages. But sometimes the dirty-minded users just visit your blog for just copy pasting your content. So to stop them copy pasting and to protect your blog, you have to disable the option of right click.

READ  How to Increase Meta Tag More than 150 characters in blogger.com
FelixMittermeier / Pixabay

Once right click has been disabled the option of copying from right click is banned. But You all know the shortcut key ctrl+c to copy the text. so the content is still not secure.

READ  Free QR Code Scanner and QR Code generator AIA File Download

So, the next step is that if you disable text selection in your blogs then ctrl+c also won’t work.

Also see: How to enable blocked right click to copy the content in a website

READ  How to Create Image URL in png or Jpg or gif format

The Steps to disable right click in blogger is shown below.

Step 1: Go to Layout Tab on the left side of the blogger menu.

html script to disable right click

Step 2: Click on ‘Add a Gadget’ at anywhere (You can choose sidebar left or right or anywhere where you can add HTML script as this won’t appear)

remove copy paste option on blogger

Step 3: Now choose the widget ‘HTML/ Javascript’.

steps to remove copy paste option

The blank space to enter the blogger’s HTML script would appear. Paste the following code from the link and click ‘save’.

READ  How to Create pages in Blogger with 7 steps

Disable Right Click using JavaScript code:

<script language=javascript>
<!–

//Edit by AppReviewes.com

READ  How to Activate Google Analytics to Blogger Pictured guide

var message=” Sorry Right Click Has Been 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;
}

READ  How to change profile picture on blogger with Pictured Explanation

document.oncontextmenu=new Function(“alert(message);return false”)

// –>
</script>

NOTE: This script will disable right click only. It does not remove text selection. So users can copy from your blog by pressing ctrl+c. To remove text selection from your blog click the link mentioned below.

Click here

LEAVE A REPLY

Please enter your comment!
Please enter your name here