[Fixed] AdBlock for Chrome pollutes DOM of original page

Posting here is no longer possible, please use the corresponding product forum.
Locked
ayanamist
Posts: 2
Joined: Mon Nov 21, 2011 6:17 am

[Fixed] AdBlock for Chrome pollutes DOM of original page

Post by ayanamist »

AdBlock for Chrome will pollute DOM of original page, because it adds style tags to the page in order to hide elements. But these elements will make page larger and have bad effects when dumping pages.
Can it just delete that elements or use following codes which will NOT add additional elements to DOM:

Code: Select all

document.styleSheets[0].insertRule('.map_canvas,.map_canvas *{display:none !important;}', 0);
Wladimir Palant

Re: AdBlock for Chrome pollutes DOM of original page

Post by Wladimir Palant »

Nice idea, thanks a lot!

We don't want to add to existing stylesheets because we might want to remove our styles later but other than the approach is the same: https://hg.adblockplus.org/adblockplusc ... ab038b722e. Next development build will be available in 20 minutes and it will have these changes.
emmortal
Posts: 3
Joined: Fri Nov 18, 2011 7:25 pm

Re: [Fixed] AdBlock for Chrome pollutes DOM of original page

Post by emmortal »

Good fix, however with this update I notice some webpages are a little jumpy now. While watching on http://espn.go.com/ first video, the page will jump up and down every few seconds. This is in Chrome 15 and 17 with experimental AB+ build.
geki007

Re: [Fixed] AdBlock for Chrome pollutes DOM of original page

Post by geki007 »

Yes very bad flashing :(
Another example: http://winfuture.de/news,66725.html (with german filterlist)
Eilat

Re: [Fixed] AdBlock for Chrome pollutes DOM of original page

Post by Eilat »

Confirmed, also in Bing search results and on articles at heise online. Additionally I get very high CPU load with this build. It took me a moment to figure out, there was a recent update that causes this.
Wladimir Palant

Re: [Fixed] AdBlock for Chrome pollutes DOM of original page

Post by Wladimir Palant »

Yes, I can see it. Weird...
Wladimir Palant

Re: [Fixed] AdBlock for Chrome pollutes DOM of original page

Post by Wladimir Palant »

Now I feel stupid: https://hg.adblockplus.org/adblockplusc ... 1abc4f918a
I should be more careful when I add code for testing.
Locked