Enable Right-Click On Any Website (Including Orkut)

There are many websites which prefer to disable right-clicking on web-pages specially images. To do this they normally use one of JavaScript ways.

The most popular way is to add following code to element tag on which you want to disable right-clicking.

oncontextmenu="return false;"

For example, say you have code for an image like below…

<img src=”something” />

Change it to…

<img src=”something” oncontextmenu="return false;"/>

Now reason I am posting about this is, popular social networking site Orkut, which I use quite often, started using code like above and disabled right-clicking on album images.

So as usual, we got to do something to get back our right to “right-click”!

GreaseMonkey Script: If you use Firefox and GreaseMonkey, then easiest way to enable right click on any website is to install right to “right-click” script.

JavaScript: If you are not fond of GreaseMonkey, then you can try following JavaScript.

javascript: var items = document.evaluate('//*[@oncontextmenu="return false;"]', document, null, 7 , null); for ( i = 0; i < items.snapshotLength; i++){items.snapshotItem(i).removeAttribute('oncontextmenu');};void(0);

Bookmarklet: You can also use this bookmarklet in Firefox and other standard-compliant browser.

Internet Explorer: If you are an IE user, specially IE 6 then paste following code in address bar and hit enter whenever you stuck. Please note code below is for Orkut only and most likely to break anytime.
javascript: document.getElementById('m').oncontextmenu="";void(0);

Important Note:

From above all solutions, I am planning to take GreaseMonkey solution further. I will add more anti right-clicks hacks soon. As of now this script takes care of most famous way so it should work on many sites.

We can not blindly set “oncontextmenu” attribute to null or “return true” as some sites provides useful functions by overriding browser context-menu. WordPress, Google docs are some popular examples.

If you find a site where right-click is disabled and this script is failing to work,  please leave a comment below with page URL and element description where it failed to work. I will try to update this script ASAP.

Link: Install Right to “Right-Click” Script (How?)

Related: JavaScript to Unmask Password on Web Pages

11 Comments

Pranay airan September 15, 2008

thanks for the script but i have another solution which works on every website that disable right click…
This tric works only in firefox, you simply need to downlaod developers toolbox addon of firefox from the link below..

https://addons.mozilla.org/en-US/firefox/downloads/file/28678/web_developer-1.1.6-fx.xpi

intall it and after it whenevr you want to disable the no right click option on any website just go to disable- disable javascript-alljavascript from developers tool box thats it..
dont foget to enable javascript after our work done…

This trick work on every website…
Enjoy..
Pranay airan
http://www.ipfunda.co.nr

Rahul Bansal September 18, 2008

@Pranay
Web-developer extension is quite heavy. I already use it as a developer but disabling javascript is wrong solution.
Say in orkut example, if you disable javascript then you can’t navigate to next photo in album. You cant even do basic things like scrapping someone!
Also with extension you have to keep enabling/disabling javascript all the time.
So better use this script… 🙂

p@r@noid September 17, 2008

thanx…nice piece of info

pranay airan September 18, 2008

Originally Posted By Rahul Bansal@Pranay
Web-developer extension is quite heavy. I already use it as a developer but disabling javascript is wrong solution.
Say in orkut example, if you disable javascript then you can’t navigate to next photo in album. You cant even do basic things like scrapping someone!
Also with extension you have to keep enabling/disabling javascript all the time.
So better use this script… 🙂

Yap its true that web developer toolbar is heavy but its a complete solution for all your problems your script is good but it is limited to specific website only
also i have clearly mentioned that you have to enable javascript again to perform your work,,,

Rahul Bansal September 25, 2008

@Pranay
Its not limited to orkut… It works on almost every site.

Also if you disable javascript completely you can not use many features of websites like orkut.

Billyf March 13, 2009

Hey HDGuru.com does not work, which is really stupid (on HDGuru standpoint) what are they trying to protect…

Thanks for the script

Rahul Bansal March 19, 2009

@Billyf
I will check if I can make right-click work on HDGuru.com soon

Akshay Kakkar March 25, 2010

Hey if you can just try to it on my sit3 (click my name) then do tell if u can…

mikell May 1, 2010

There is a site called Lavalife.com which doesn’t appear to work with your Allow Right Click script (at least for me). Is Google Analytics involved with disallowing right clicks?

michealj May 27, 2011

hi..rahul can u tel me how to enable the right click ” save image as ” option .on flickr sometime i found that i can not save image by right click ..although with somescript i have enabled the rightclick but still save image as option is not visible…

Anand Sarin August 16, 2012

Sir, I have problem regarding this website http://www.gktoday.in. In this website neither i can right clik, or copy any of its material nor i can take printout of the material from the website. I wanted to know is there any way by which i can have copy of the material from this website??