How disable right click on blogger images only?

My previous post on how to disable to right click on blogger. This post explains how to disable right click only on images. It is also important to disable the right click on images in which your blog image may be copied with your permission. And this message is useful to protect some copyrighted images but some loyal user may be disappointed as right click option has been disabled. And after all it just to protect your content from being copied.

And it is very difficult to keep people from copying our content like texts,images and others. But we can minimize it by disabling some functions.

How to add this script to blogger

Step 1: Go to Blogger Dashboard -->Select Layout-->Add Gadget-->HTML / JavaScript

Step 2: Copy the code given below.

Step 3: Save the HTML/ JavaScript and finally view your blog.

<script language="JavaScript1.2">


//Disable right mouse click Script

//By Maximus ( w/ mods by DynamicDrive

//For full source code, visit

var clickmessage="Function disabled on images!"


function disableclick(e) {

if (document.all) {

if (event.button==2||event.button==3) {

if (event.srcElement.tagName=="IMG"){


return false;




else if (document.layers) {

if (e.which == 3) {


return false;



else if (document.getElementById){

if (e.which==3&&"IMG"){


return false




function associateimages(){




if (document.all)


else if (document.getElementById)


else if (document.layers)


// -->


Note: Replace  Function disabled on images!  with your own message like "No Right Click On Images Allowed Here

Post a Comment