Cure to mouse click-activated popups


#1

It’s been a long time since Firefox and Internet Explorer among others began implementing popup blocking functionality. These implementations had been largely successful in blocking the conventional style browser popups ie. ones that load when the site is visited and do not require user action. These were usually called with the [B]Window open/B [COLOR=Black]function, although there were more sneaky methods as well.

It was all well for many years but in the past few years there is a nuisance that has become more widespread that takes advantage of the fact that conventional pop-up blocking ways allow script based popups to be opened upon user action. The way this is usually implemented on various download, torrent sites and others is the user visits the page, no popup is loaded. But the entire website layout is embodied within a script that opens a popup [/COLOR]when
[B]onclick/B [COLOR=black]activated, ie. a user clicks anywhere on the page with their mouse.

This is extremely infuriating (not to mention dangerous, as these popup ads can contain malware scripts) and so far my response to websites acting in this way has been to manually block those scripts or disable javascript as a whole but this has had a couple drawbacks: 1) The website may intentionally refuse to render when javascript is disabled, 2) website may not work properly and 3) it is time consuming. It has been manageable because until recently it’s just been 1 site I frequently visit that acts this way but this behavior is starting to become more and more widespread which is why I am sharing a quick’n’dirty solution for this which works on Mozilla Firefox and browsers based on it. What the following does is it instructs the DOM interface to ignore the mouse (and other) events that would usually lead to a popup window being opened. So without further due, if you want to get rid of those annoying popups here’s how to do this:

  1. Navigate to about:config in your url bar and click “I promise” to get past the nag window
  2. In the search bar enter [B]dom.popup_allowed_events[/B]
  3. Double click the value, erase all strings (or preserve the events you deem you need) and press enter

Navigate to the website that used to provide the popups and rejoice in the fact you have beat the system! (or if it didn’t work for a particular site post the url in this thread so I can investigate)

This is a somewhat drastic measure and you will encouter websites that will require you to enable onclick events in which cases you simply follow the original procedure but instead of double-clicking the value in about:config, you open the right click menu and select “reset”. This will reset the default value and functionality.

Hopefully I helped some people, I know this is exclusive fix for Firefox and unfortunately it’s not possible to do this with other browsers (that I know of) without writing an extension due to the fact they don’t allow such low-level configuration of the DOM…
[/COLOR]


#2

That’s a brilliant tip, as I’ve wondered whether pop-ups could be disabled for mouse/keyboard triggered events.

Unfortunately some websites rely on pop-ups for legit purposes (e.g. payment process, 2-factor authentication, etc. in a pop-up). However, an easy workaround would be to use a separate Firefox Portable installation with this tweak that has a Desktop shortcut titled “Firefox no pop-ups” for accessing unfamiliar websites, including those known to use pop-ups.

Another trick I have used is right-click, then left-click. When the mouse is right-clicked, the pop-up event is cleared and then left clicking will work as usual until the next webpage is opened. On the other hand, I still get caught if I’m not aware that a website I’m on has a pop-up event armed.


#3

[QUOTE=Seán;2788367]
Unfortunately some websites rely on pop-ups for legit purposes (e.g. payment process, 2-factor authentication, etc. in a pop-up). However, an easy workaround would be to use a separate Firefox Portable installation with this tweak that has a Desktop shortcut titled “Firefox no pop-ups” for accessing unfamiliar websites, including those known to use pop-ups. [/QUOTE]

You are correct there are certain websites that will cease to function correctly when this fix is applied, I’ve personally ran into this issue when I tried to view the recorded proceedings in the U.S. House of Representatives website (house.gov). They have a multi-purpose button to start the live feed which would normally work with LMB but obviously this fix wouldn’t allow that, so I had to disable it for that session.

Your suggestion would benefit anyone who runs into such issues more often, but I would just like to add that there’s no need to download a separate Firefox binary just for this purpose. You can actually achieve the same effect by closing off all running firefox.exe processes, then opening the Run dialog and typing “firefox.exe -P” which will take you to the Firefox Profile manager. You would create a new profile without starting it immediately (otherwise it will become default). Then you would create the shortcut on the desktop and point it to “<firefox location>\firefox.exe -p <profile name> -no-remote”. You now have a link to an alternative firefox profile which you can configure separately from your default profile. Saves some disk space and makes it easier when updating Firefox, as you won’t have to update 2 installations separately.

[QUOTE=Seán;2788367]
Another trick I have used is right-click, then left-click. When the mouse is right-clicked, the pop-up event is cleared and then left clicking will work as usual until the next webpage is opened. On the other hand, I still get caught if I’m not aware that a website I’m on has a pop-up event armed.[/QUOTE]

I actually forgot to mention I had been using this method as well. An issue that arose was that the websites that generated popups from mouse activity also generally had a script blocking the right click context menu (I mean if you’re gonna be unethical why not go all out, right?) which would render this ineffective. However this method becomes fully effective if you change the following parameter to FALSE in about:config: [B]dom.event.contextmenu.enabled[/B]. That disables websites from having the ability to change the context menu behavior or block it out right. I don’t see any legitimate use in a website having the ability to block your context menu so I don’t think it will have any negative side effects.


#4

For me, uBlock Origin problem by auto-closing any popups that contain ads. If I get a popup to do legit things like entering creditcard numbers, uBlock will simply let those windows be.


#5

It’s confusing. Even I faced the same situation for few days. Then I use pop up blocker. You can try for it.