
Loading…
Adwords ads appear quickly, then disappear #57
I was wondering if it would be possible to remove them from the start
It indeed is possible, but not using the EasyList filters. Thing is, the filters in EasyList are designed the way they are designed because of how ABP was designed.
What I mean by this is uBlock can indeed handle the hiding of ads in a better way, but this cannot be done for many of the filters because there were no point in optimizing them for ABP -- with the current results that ABP consumes huge amount of memory.
I did try what you did in the video, the only difference being that I go through google.ca. I noticed the same result as you did. I "fixed" it by optimizing the filters for uBlock:
google.ca###cnt #center_col > #res > #topstuff > .ts,#center_col > div[style="font-size:14px;margin-right:0;min-height:5px"] > div[style="font-size:14px;margin:0 4px;padding:1px 5px;background:#fff8e7"],#tads.c,#tads + div + .c,#topstuff > #tads,#bottomads,#rhs_block > .ts[cellspacing="0"][cellpadding="0"][style="padding:0"],#rhs_block > #mbEnd,.mw > #rcnt > #center_col > #taw > .c,.mw > #rcnt > #center_col > #taw > #tvcap > .c
Use this as a custom filter, except replace google.ca with whatever google domain you go through in you region. With the above filter, I don't see the ads blinking. The trick is to restrict the filters to a specific domain name, this way the filters can be injected very early, before the DOM is loaded.
So long term, we need to rewrite the filters to be more suitable for uBlock. The way they are designed is not optimal, and this is at the heart of ABP's memory and CPU consumption problem. Creating more specific filters is the key.
Rewriting the most important filter should be an ongoing project, but no way I can do all that alone. Not sure how to organize this. Maybe a github repo just for this purpose, with many maintainers so that I don't have to be involved as I rather code than spend to much time on this part.
Thanks gorhill, your "fix" works. And I understand now why ABP uses a lot of memory, it'd be a difficult task to rewrite everything for sure. But hey, maybe one day!
New filter class: entity-based filter, i.e. filters which will be injected if entity of the page matches entity of the filter. For instance:
google.com
google.ca
google.be
google.com.br
are all the same entity. So the following filter:
google.*###cnt #center_col > #res > #topstuff > .ts
matches any of them.
Formal definition of "entity": domain name minus suffix as per Public Suffix List.
This makes it easier to create filters for a bunch of related domain names, without being forced to make them generic (which I believe is the reason why the above filters were made generic in EasyList, because of the number of Google-owned servers out there.)
Thanks
When you do a search on Google, there are some Adwords ads that appear very quickly and then disappear. It's not what we can call a problem, just I was wondering if it would be possible to remove them from the start? I'm saying this because Adblock Plus blocks them directly. (Maybe µBlock's engine cannot handle this, I'm not sure.)
Here's a video if you need one, with an screenshot: https://dl.dropboxusercontent.com/u/26443953/ublock.mov
