Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Google search ads not blocked in "Adblock emulation mode" #325

Closed
ghuntyk opened this issue Jun 1, 2014 · 6 comments
Closed

Google search ads not blocked in "Adblock emulation mode" #325

ghuntyk opened this issue Jun 1, 2014 · 6 comments

Comments

@ghuntyk
Copy link

ghuntyk commented Jun 1, 2014

I am trying to use HTTPSB as a more efficient Adblock and selected the adblock emulation mode on start up and removed the Google scoped rules. However Google text ads still appear in search (class=ads-ad). What am I doing incorrectly?

@jonvuri
Copy link

jonvuri commented Jun 1, 2014

I have noticed this recently too. Are you using the Chrome Instant search (from the omnibox)?

@gorhill
Copy link
Owner

gorhill commented Jun 1, 2014

I don't see .ads-ad in EasyList. Try adding it in the "Your block rules" textarea. I will update the 3rd-part assets, maybe it was added lately.

@gorhill
Copy link
Owner

gorhill commented Jun 1, 2014

Ok, I could get a search results with the ads, investigating.

@gorhill
Copy link
Owner

gorhill commented Jun 2, 2014

Interesting... The style is properly injected, the elements match, and yet the style isn't applied. I need to investigate further eventually, but a good fix is to simply directly hide the elements themself without relying solely on the injected style. So far it looks like it works well.

@gorhill gorhill closed this as completed in 82a3f78 Jun 2, 2014
@ghuntyk ghuntyk changed the title Google search ads not block in "Adblock emulation mode" Google search ads not blocked in "Adblock emulation mode" Jun 2, 2014
@jonvuri
Copy link

jonvuri commented Jun 2, 2014

Wouldn't this effect a performance hit scaling on the number of elements hidden?

@gorhill
Copy link
Owner

gorhill commented Jun 2, 2014

@jrajav Typically there is only a handful of elements which needs to be hidden on typical pages. The most expensive parts of the whole element hiding process is the original querySelectorAll for all classes/ids on the page, and second, the intersection of these classes/ids with the filters. The rest is really insignificant compared to these two steps. You could trace-step into the code to see it. And then the sum of all of this is rather quite a very small overhead compared to ABP adding over 13K rules on every single page (assuming no other list with element hiding filters are used).

Edit: for example, on Google search, I got 13 selectors as a result of the above intersection, and querying these 13 selectors returned two elements which needed to be hidden. So nothing to worry really.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants