Re-Enable Right-Click When Web Pages Turn It Off

Posted July 7, 2004 by AlexTheBeast in HTML

Several web pages turn off the ability to right-click. The following tutorial contains examples of how to turn it back on.


People are nuts about protecting their website from unauthorized copying. One of the most frequently used ways to prevent copying is to use javascript or to disable the ability to right-click.

Of course, users can use javascript to turn it back on.

To re-enable right-click when visiting the offending website, type the following into the URL bar of your browser:
javascript:void(document.oncontextmenu=null)

This example works against the following page:
www.users.totalise.co.uk/~bigoleg/javascript/javascript_disable_right_click.html

If a dialog box opens whenever you right-click, you can often get around it by using the following sequence:
Hold the right mouse button, hit Enter to close the dialog box, and then release the right mouse button.

This example works against the following website:
www.cof.orst.edu/net/software/web/html/disable_rtclick.htm

Disclaimer:
Copying websites is not cool but disabling right click is not either.

The Conversation

Follow the reactions below and share your own thoughts.