4umi.com/web/bookmarklet/rightclick.htm

Restore the right click

Page Bookmarklet

This page cannot be right-clicked. Or, you can click it, but the contextmenu, the menu that you would normally expect to pop up at the tip of the mouse, will not appear. A Javascript on the page stops it from appearing, effectively cancels it. This disabling of the contextmenu is often employed by webpage makers in their fruitless attempts to stop the copying of their images, their code or even the text on the page. It is however in the very nature of the web that these materials are being copied, archived and duplicated. Some even employ alert boxes in their script to show off their cluelessness. Since there are many other ways to copy an image, and the contextmenu is valuable for some, but necessary for others, these scripts are no good to anyone.

You can however insert your own script into the page to reverse the first one and restore the contextmenu to its full strength. This is easiest done by running a so-called bookmarklet, a bookmark in the bookmarks menu like any other, but linking to a Javascript rather than an URL. Simply click a link below to run the bookmarklet script. It will overwrite the malicious disabling of the right-click menu on the page here and now and restore the default behaviour of the right-click action. Add the link to your bookmarks (right-click on it if you can and choose Add to Favorites… from the pop-up menu). Now wherever you go on the www, the bookmark is always there to remedy any page infected with no-right-click scripts. Refresh the page to rerun the original script.

BookmarkletDescriptionLengthFrames?
Right-clickRestores the contextmenu where it has been disabled.166No
Right-click-multiRestores the contextmenu where it has been disabled.255Yes

The code

The HTML code of the first link looks like this:

<a href="javascript:(function(){var d=document;d.onmousedown=null;d.onmouseup=null;d.oncontextmenu=null})()">Right-click</a>

The content of the href attribute of the second bookmarklet link has been reproduced with added whitespace and highlighting. It features an anonymous function which calls itself recursively with the top or any of its child window objects as the argument.

javascript: 
( function( w ) { 
  for( var i=0; i<w.length; i++ ) { 
   arguments.callee( w.frames[i] ); 
  } 
  try{ 
   function n( r ) { 
     r.onclick = r.oncontextmenu = r.onmousedown = r.onmouseup = null; 
   } 
   n( w.document ); 
   n( w.document.body ); 
  } 
  catch( e ) { 
   alert( 'Bookmarklet failed:\n\n' + e.message ); 
  } 
} )( top );