The most popular way is to add following code to element tag on which you want to disable right-clicking.
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”!
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.
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.