
Loading…
[Chromium] Blocked iframes not always collapsed on stackoverflow.com #673
adzerk.net/ados.js is responsible for the iframe ads and If you're using uBlock's default filters, EasyList has ||adzerk.net^$third-party but it also has 3 exceptions.
@@||engine.adzerk.net/ados?$script,domain=stackoverflow.com
@@||static.adzerk.net/ados.js$domain=stackoverflow.com
@@||adzerk.net/ados.js$domain=majorleaguegaming.com
Well whatever EasyList does, I get this:
Bottom-line, the content of a frame was blocked, uBlock is supposed to collapse it. It's kind of random though, probably because the blocked content collapsing code is split in two parts, the pre- and post-DOM loaded event.
I don't know why there are exceptions in EasyList for adzerk.net on StackOverflow -- but that's not the issue here. It looks to me the site works fine without that exception. Report to EasyLIst if you want, I just don't have the time.
Got curious as to why part of adzerk.net was whitelisted: https://hg.adblockplus.org/easylist/rev/d2083c34a335
@gorhill while reproducing this, it appears that the sub_frame request for the iframe is blocked indeed. However, the iframe has an explicit width and height set, and it doesn't appear that µBlock does anything to explicitly remove/hide elements for which it blocks the requests (when it makes sense to).
Which is to say: iframe, img, object, video, audio.
Am I missing something?
it doesn't appear that µBlock does anything to explicitly remove/hide elements for which it blocks the requests
Of course it does. The problem here is that the src property is empty, instead of being set with the URL of the blocked request.
@gorhill right, that's what I'd thought, but I couldn't trace it along the chain of a sub_frame request through µBlock.
I'm sorry for the inconvenience, but mind pointing me to the part that removes/hides the blocked element from the DOM?
I understand that a cosmetic filter might match the element, but it also seems like it's a good idea to manually set .style.display = "none"; for targets of certain types of requests (sub_frame, img, etc.)


Any question page.
From what I've gathered so far, a proper
loadorerrorevent is emitted by the frame, however, thesrcattribute is empty -- thus the URL can't be checked against the filters.Need to investigate further.