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 18.104.22.168 (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
- 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:blankentry in the list of blockable items. This is due to how Gecko works, a new window always loads
about:blankbefore 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:blankentry. This is a Gecko limitation, so for such pop-ups you will only be able to block all pop-ups or none.
Commenting is closed for this article.