Link to home
Start Free TrialLog in
Avatar of Jack McKenzie
Jack McKenzie

asked on

How to block popup divs in Chrome and FF?

Is there any working solution to block AJAX popup divs in Chrome and Firefox?
Avatar of David Favor
David Favor
Flag of United States of America image

Normally be default, any recent browser version does automatic popup blocking.

For Ad Blocking (different), you'll use an Ad Blocker extension... like...

Ad Blocker or uOrigin or something similar.
Avatar of Jack McKenzie
Jack McKenzie

ASKER

no, completely wrong, I wrote popup divs, not popup windows! Browsers don't block popup divs. If they did there wouldn't be this question.
Jack, while David Favor's first sentence was off topic, the rest of his post is on topic. (Hence why I marked it as helpful.)

Many of the popular ad-blocking extensions provide a context menu option (or option from the extensions button in the menu-bar/toolbar) for blocking specific elements on a web page. I recommend "uBlock Origin". (I use it in both Firefox and Chrome.) Ad-blocking extensions can be configured for different modes. You don't have to use the shared block lists if you don't want to. You can also use them to block the cookie notifications that sites have added to comply with the EU law regarding them.
uBlock is helpful, yes, but Ad blocking is a completely different domain. See, ad-blocking requires lists, and updates, and it only works for what is on the list. Popup div blocking is something that can block all popup divs, so that it won't be possible for anything, regardless if it's an ad or not, to use the popup mechanism.

Going into the critical detail: they all use JavaScript.
To block them all, in theory, blocking JavaScript will do.

However, most websites do not function without JS. So, the solution should block the specific JS functions that make it possible to code popup divs. One of them is the timer. It should be blocked by default, simply never trigger the attached callback after a timer is set.

Another is the position of the user on the page, and if it's simply blocked by default (i.e. always 0) nothing can pop up when scrolling down.

So, one possible solution to block popup divs will be one that blocks JavaScript timer and JavaScript location on the page. No lists, and it blocks irrespective of what would pop up (whether it's an ad or not).

Now, the question is again about a solution that can do this. If it was possible to configure in about:config of the browser, I'd have done it, but so far I haven't seen it there in Chrome and FF. I have ad blockers on, but they don't catch all these things.

Is there not yet something better than Ad Blocker, just to disable JS timers by default (and allow manual enabling per page) and disable window position on pages by default (enable manually per page)?
Perhaps we would be better able to help you find a solution if you would explain why you want to do this?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.