Google-chrome – How to set Google Chrome to not allow javascript to hijack the right click menu

google-chromejavascript

I despise web sites that hijack my right mouse button via javascript. Other browsers ( like firefox) allow me to block sites from doing this. Does chrome have such an option, or does it leave me at the mercy of annoying web site designers?

I don't want to turn off javascript completely. I just want to block javascript from taking over my right mouse button. Firefox lets you stop javascript from doing specific things like this. I am trying to find out if Chrome does as well. I am going to assume it does not at this point.

Best Answer

Press F12 to bring Google Chrome Developers Tools out and navigate to Console tab and run below command:

document.oncontextmenu=null;

It should bring most of the context menu back.

It should work for Firefox as well.

Of course on Firefox you could just use Shift + right-click to bypass the JS context menu.