[Fixed] AdBlock for Chrome pollutes DOM of original page

Posting here is no longer possible, please use the corresponding product forum.

[Fixed] AdBlock for Chrome pollutes DOM of original page

Postby ayanamist » Mon Nov 21, 2011 7:22 am

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);
ayanamist
 
Posts: 2
Joined: Mon Nov 21, 2011 7:17 am

Re: AdBlock for Chrome pollutes DOM of original page

Postby Wladimir Palant » Mon Nov 21, 2011 5:01 pm

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.
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

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

Postby emmortal » Mon Nov 21, 2011 5:58 pm

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.
emmortal
 
Posts: 3
Joined: Fri Nov 18, 2011 8:25 pm

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

Postby geki007 » Mon Nov 21, 2011 10:58 pm

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

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

Postby Eilat » Mon Nov 21, 2011 11:12 pm

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.
Eilat
 

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

Postby Wladimir Palant » Mon Nov 21, 2011 11:29 pm

Yes, I can see it. Weird...
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

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

Postby Wladimir Palant » Mon Nov 21, 2011 11:36 pm

Now I feel stupid: https://hg.adblockplus.org/adblockplusc ... 1abc4f918a
I should be more careful when I add code for testing.
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 4 guests