web-cheatcodes

Get back the context menu

The context menu of a browser is full of great functionality. You can open links in new tabs, save content, add to Collections, take screenshots, select content for translation, switch to immersive reader mode or tell the browser to read out the current page to you.

It is also the thorn in the side of people who think protecting their content from saving or copying is more important than allowing people to customise web products to their needs. A hamfisted way to to that is to define something called an Event Handler on the document and override the context menu functionality.

You can try this in this demo page. When you right-click anywhere in the document, it’ll tell you that it is copyrighted and you shouldn’t do that.

To remove event handlers and get back the context menu you need to:

  1. Go to the Elements tool and select a high level element (<html> for example) The Elements tool
  2. Pick Event Listeners in the lower panel and look for contextmenu The Event listeners tool of Elements showing a contextmenu event
  3. Click the triangle to expand the information
  4. Hit the remove button

Here you can see this in action:

Screencast of removing the contextmenu event listener