Normally when a user clicks a middle mouse button on a link on a web page, the link opens in a new tab. When a user clicks right mouse button, a context menu appears. Now there are some annoying sites that reassign this behavior, so when a user clicks a mouse button, they perform whatever they want, open popup windows, redirect wherever they want.

My guess, this is achieved through adding element event handlers like onclick="DoSomeAnnoyingStuff".

Is it possible to disable "onclick" event processing on a web page with uBlock Origin?

  • (Temporarily) disabling javascript for the page might be a workaround... but what you're looking for seems like a reasonable option for uBlock... maybe NoScript might be a better idea? – Xen2050 Nov 16 '17 at 23:10
  • 1
    To turn javascript completely on a web page I need to reload it with javascript set "off". In that case the page completely stops working, all the functionality is gone. Not very useful. – and his dog Nov 16 '17 at 23:41
  • Yeah, that can happen. That's why No Script might work, it's got pages of options for disabling only some features IIRC – Xen2050 Nov 16 '17 at 23:51
  • Thanks for the suggestion. Since there is no certainty if this can be achieved with No Script, I first would like to find out if this is possible to do with uBlock Origin, because I already have it installed, before exploring other options. Are you referring to this add-on: addons.mozilla.org/en-US/firefox/addon/noscript – and his dog Nov 17 '17 at 0:06
  • 1
    That looks like the right NoScript add-on, I haven't used it for a while (switched to Chromium) but it used to have several tabs full of different options to turn off & on. It's FAQ has a section on "clickjacking" that sounds related – Xen2050 Nov 17 '17 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.