Adblock Plus and (a little) more

Status of "immediate unblocking" feature · 2007-03-07 03:28 by Wladimir Palant

My post about finding a way to unblock items immediately when the filters change was probably too optimistic. I am finished coding the basics but I hit some problems in Gecko.

Stylesheets seem to be the only elements where the simple “remove and re-add” approach actually worked. If you re-add a stylesheet to its document, the check whether it should be loaded will be triggered again. Perfect. Less so with images — here the check will only be triggered if previously the image was blocked, for successfully loaded images the check is not repeated. But I managed to reset the image’s state using nsIImageLoadingContent so everything is fine again.

Objects are identical to images with the exception that Firefox trunk nightlies currently have some bug — calling nsIImageLoadingContent.loadImageWithChannel makes the objects disappear. Not nice but it should be possible to fix this, after all these are nightlies and not a released Firefox version. And regression fixes are always easier to justify.

But the real problem are frames. Generally re-adding them does what it should do. However, if there is more than one frame in the document Gecko might confuse them. When you unblock a frame it will show the contents of the other frame for a second. And when you reload the page after that the contents of both frames will be identical. This is a Gecko bug of course but not a new one — both Firefox 2.0 and trunk nightlies show the same behavior. And I suspect that this bug has been there since the “beginning of time”, having its roots in the DOM0 frames collection that simply doesn’t handle insertions well.

I still need to check the situation with the types “other” (usually XBL bindings though with some luck XMLHttpRequests should appear here as well soon) and “link”. Unblocking scripts and background images however certainly won’t be possible without reloading the page.


Comment [10]

  1. chewey · 2007-03-07 18:02 · #

    Well, for me this is more a “nice to have” feature than a really important one.

    I still think the next ABP version will be really great, the element hiding hit detection alone will be a huge improvement.

    Reply from Wladimir Palant:

    There is an important use case. With this feature Adblock Plus could replace Flashblock – you simply block all objects and if you decide that you want to see one you right-click the placeholder and select “Unblock this time only”. And you would be able to do the same for everything of course. But even making “Apply” work consistently would be great already – right now it can only block but not unblock, and it will always collapse regardless of your settings.

  2. rabid hamster · 2007-03-08 06:02 · #

    nah nah Flashblock is a nice companion to Firefox and Adblock – there is no point in trying to “replace” it. in many cases I like the “load and start on demand” side of Flashblock, and that is this “dont start immediately but only if and when I ask for it” that I would like to find in other embeded plugins and media players, like Quicktime instead of them immediately starting to stream data even before I have decided if the page is of interest or not.

  3. cb · 2007-03-12 06:10 · #

    I only used FlashBlock a little — most of its life I had switched from the increasingly-buggy Phoenix back to Opera where I ran with plugins off until needed — but when I came back to Firefox NoScript and its “plugin tabs” had basically obsoleted it.

    It sounds more and more like these extensions are coming together from different angles, which is most lovely. I thank you and similarly-interested extension authors for giving me the tools to intuitively modify content. I imagine a day where all embeddables are accessible from a NoScript-like menu, with AdBlockPlus-like filters, and DOM Inspector overlays for everything (like Stylish will probably be getting in 0.5!) to aid in filtering, rearranging, and user style and script creation and publishing.

  4. Katie · 2007-09-03 15:18 · #

    Hi! I acidentally clicked, “Block images from”
    and I hate it! How do I unblock it? Cuz I dont know how!!! Email:

    Reply from Wladimir Palant:

    “Block images from …” is a built-in feature of Firefox, has nothing to do with Adblock Plus.

    Go to Tools / Options / Content / Load images automatically / Exceptions – find the offending entry there and remove it.

  5. logo2008 · 2007-11-14 22:21 · #


  6. tammy · 2007-12-21 18:15 · #

    this is ma name it go heard

  7. tshah21 · 2008-08-11 23:43 · #

    how do i unblock an item from ABP?

    Reply from Wladimir Palant:

    By going to Adblock Plus Preferences and removing the filter. See also

  8. Tyler · 2008-10-21 22:06 · #

    I accidentally had ABP block all images on a site, thinking that just the ad would disappear. Now I can’t see any images at all! And I can’t find a way to unblock them. It’s more than a little frustrating. Even whitelisting the page doesn’t help. Ironically, that makes the ads show up again but not the site images…

    Is there anything I can do short of uninstalling and reinstalling ABP?

  9. Tyler · 2008-10-22 06:00 · #

    Disregard that. I hate myself for not fully reading all the other comments on this page. I apologize for the hand-shaped marks you must have put on your faces after reading the same question asked twice.

  10. Term Papers · 2009-11-14 09:35 · #

    I never thought of it like that, but it really is true.

Commenting is closed for this article.