DarkWebCode is a place where you can find a lot of exciting and inspiring stuff about Web Development, Blogging, SEO and many more


How To Disable Right Click On Blogger Blog

Normally, most blogs keep the right-click option enabled to let their users navigate, copy, print, save and reload their webpages. 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-clicking.
You can disable right-click by adding a small JavaScript code on your Blogger blog.
The Steps to disable right-click in blogger is shown below
step 1: Open the Blogger Blog dashboard.
step 2: Click the Layout button.
Click the Layout button
Click the Layout button

Step 3: Select Add a Gadget.
Select add a Gadget
Select add a Gadget

Step 4: Now choose the widget 'HTML/ Javascript'
Select HTML/JavaScript.
Select HTML/JavaScript.

Step 5: Leave the title section blank and paste the JavaScript code(given bellow) in the content section.
//code by DarkWebCode
var message="Right Click Has Been Disabled";
function clickIE4(){
if (event.button==2){
return false;
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
if (document.layers){
else if (document.all&&!document.getElementById){
document.oncontextmenu=new Function("alert(message);return false")
// -->
Paste the JavaScript code  on the content section and Save
Paste the JavaScript code  on the content section and Save

Step 6: Finally, Save your changes and reload your blogger blog post.