Adblock Plus and (a little) more
Experimental pop-up blocking support · 2011-10-03 16:29 by Wladimir Palant
The current development build (Adblock Plus 1.3.11a.3162) added support for blocking pop-ups directly, working for Gecko 1.9.2.6 (meaning Firefox 3.6.6) and higher. Filters will not block pop-ups by default, only if the $popup
type option is specified. So one can use the filter ||livejasmin.com^$popup
to block all pop-up windows opening livejasmin.com. Or one could use ||livejasmin.com^$popup,domain=example.com
to prevent only example.com from opening such pop-ups. Pop-ups opened by a page will appear in the list of blockable items and can be blocked from there.
For subscription authors: if you add pop-up blocking rules to your filter list you might want to do it in a backwards compatible way: ||livejasmin.com^$popup,image,~image
. This makes sure that the filter doesn’t block anything in Adblock Plus versions that don’t know the $popup
option.
Known issues:
- If the pop-up opens in a new window rather than a new tab you will briefly see the pop-up window. This window is closed before running any code
and sending any network requestshowever. Edit: The initial network request is actually being sent but is canceled immediately after receiving HTTP headers. - For each pop-up opened you will see an additional
about:blank
entry in the list of blockable items. This is due to how Gecko works, a new window always loadsabout:blank
before loading the actual pop-up target. - For same-origin pop-ups (opening page and pop-up are from the same host) you will get only the
about:blank
entry. This is a Gecko limitation, so for such pop-ups you will only be able to block all pop-ups or none.
Comment [4]
Commenting is closed for this article.
fan · 2011-10-03 17:09 · #
Try it soon.thanks for providing this feature.
fan · 2011-10-03 17:22 · #
It seems block a[target=”_blank”] too.It’s troublesome.
Reply from Wladimir Palant:
Yes, target=“blank” is also a pop-up. I think that this behavior is correct.
Marijo · 2011-10-03 17:27 · #
Finally we can put these pesky pop-ups to rest!
Thanks, Wladimir!
IceDogg · 2011-10-03 19:19 · #
WOOOOOT!! I’m very excited about this one. I’ve used another add-on to help with this but I would rather it all be in one add-on. Thanks so much for doing this Wladimir!!! I’m not playing around I really am excited about this.