uBlock-LLC / uBlock

uBlock: a fast, lightweight, and lean blocker for Chrome, Firefox, and Safari.
https://ublock.org/
GNU General Public License v3.0
8.19k stars 437 forks source link

Doesnt work on several domains #380

Closed Gaborss closed 9 years ago

Gaborss commented 9 years ago

www.focus.de www.pro7.de www.gala.de

Easylist gets updatet, but the ads are showing nevertheless. The divs and images do have randomly names. so no filter fits.

best thing would be to cloak ublock because these ads are just shown if an adblocker is detected

or find a text string in the javascript to block it (but they will change the strings -> cat mouse game)

perhaps there is no solution (

gorhill commented 9 years ago

Please, details exactly the URL + what specifically on the page you consider should be filtered -- I didn't see any obvious ads in the first link.

uBlock uses 3rd-party filter lists, and anything you think is missing in these lists needs to be reported to the maintainers of these lists. There is no way I can maintain lists myself, this is a hobby project, and writing the code is already taking most of my time.

gorhill commented 9 years ago

For the 2nd link, I saw banners. This filter seems to take care of them:

||www.prosieben.de/static/*.gif

For the 3rd link, this one seems to work:

||image.gala.de/130402b9fe7dc77e6bc8146088d34afe/v3/*.jpg

But as said, this needs to be reported to EasyList maintainers, this way users of other blockers will also benefit from the filters, not just users of uBlock. If ever you decide to use another blocker in the future, you will benefit too from having these filters in EasyList rather than just uBlock.

Gaborss commented 9 years ago

i mean the text+picture ads. they are quite famous in europe. these are advertisings which can be compared to google adsense...here are some pictures:

2mb112080 jpg 2mb113000 jpg gefu120a40 jpg

and here are the URLs:

http://www.gala.de/stars/news/jennifer-lawrence-liam-hat-mein-leben-veraendert_1178771.html http://www.gala.de/ http://www.focus.de/finanzen/news/grundsatzurteil-bundesgericht-begrenzt-die-sonntagsarbeit_id_4304222.html http://www.focus.de/finanzen/news/unternehmen/kreise-gesellschafterwechsel-bei-burger-king-franchisenehmer_id_4303354.html

new site: http://www.auto-motor-und-sport.de/ http://www.auto-motor-und-sport.de/video/der-porsche-cayenne-gts-steht-sich-vor-8891426.html http://www.the-voice-of-germany.de/video/41-alex-hartung-lose-yourself-clip http://www.prosiebenmaxx.de/ http://www.prosiebenmaxx.de/tv/falling-skies/episoden/der-baum-der-freiheit http://www.sat1.de/ http://www.kabeleins.de/ http://www.sixx.de/ http://www.sat1.de/

its some kind of anti adblocking: deliver ads although adblock is active. if you visit the urls above without an adblocker, different advertising will be shown. if the blocker is active, ads are shown looking like the screens above.

there is a javascript based detection.

its a clever system: as you can see here the easylist was updated several time: https://hg.adblockplus.org/easylistgermany/shortlog

https://hg.adblockplus.org/easylistgermany/rev/60707c2b99b1 https://hg.adblockplus.org/easylistgermany/rev/bc41624171da https://hg.adblockplus.org/easylistgermany/rev/d53a7d695dd9 https://hg.adblockplus.org/easylistgermany/rev/ad11ce3081a6 https://hg.adblockplus.org/easylistgermany/rev/ad11ce3081a6 https://hg.adblockplus.org/easylistgermany/rev/0ea1d2c11f21 https://hg.adblockplus.org/easylistgermany/rev/24d274e5d0e3

but several minutes/hours after the new filter was set the filter is useless cause the strings have changed - the pattern from the list doesnt match any longer...

so i think nothing can be done - its more about thinking about a different approach hiding these ads.

for example: cloak ublock because these ads are just shown if an adblocker is detected or something like that.

gorhill commented 9 years ago

cloak ublock because these ads are just shown if an adblocker is detected or something like thatad

They do not detect directly whether a blocker is present, they detect the blockers indirectly, through their effects on a page. If an image is not downloaded or if an element on the page is rendered non-visible, they can infer the user is using a blocker.

This is challenging, and especially more so given the current limitation of ABP filter syntax. Out of curiosity I will look if something which has any long-term value could be done.

But in the end it's really a cat-and-mouse game, and ultimately, users have the last word by not surfing sites which they dislike because of the ads.

gorhill commented 9 years ago

For http://www.gala.de/stars/news/jennifer-lawrence-liam-hat-mein-leben-veraendert_1178771.html, disabling inline script tags through dynamic filtering seem to get rid of all those ads in your screenshot. However I don't know that site well enough to know whether or not legitimate stuff got disabled as well.

my-password-is-password commented 9 years ago

What about these rules? All images on the pages have an alt attribute except for the ad images. The only pages where I was able to collapse were gala.de and focus.de using the "Anzeige" div that has attribute align="center".

gala.de##div[align=center]
gala.de##div[align=center]+*
!gala.de##img:not([alt])
focus.de##div[align=center]
focus.de##div[align=center]+*
!focus.de##img:not([alt])
auto-motor-und-sport.de##img:not([alt])
the-voice-of-germany.de##img:not([alt])
prosieben.de##img:not([alt])
prosiebenmaxx.de##img:not([alt])
sat1.de##img:not([alt])
kabeleins.de##img:not([alt])
sixx.de##img:not([alt])
gorhill commented 9 years ago

What are these ones for:

!gala.de##img:not([alt])
!focus.de##img:not([alt])

?

my-password-is-password commented 9 years ago

Testing. Just left it there. Not really needed since you can get the "Anzeige" div.

'!' is a comment, right?

gorhill commented 9 years ago

Ok. If you think they work well, you could submit them to EasyList maintainers. I think if you mention @ryanbr (EasyList maintainer) here along with your filters and what ads they fix on what URLs he is going to be notified. This would be up to him to accept your suggested filters.

How long will these still be effective though is the question.

Edit: Yes, ! is a comment, just wanted to be sure it wasn't a typo.

my-password-is-password commented 9 years ago

Yeah, these filters probably won't last long or might even hide legit images that don't have an alt attribute.

JeremyWW commented 9 years ago

Interesting that uMatrix cleans up pro7.de out of the box.

gorhill commented 9 years ago

Interesting that uMatrix cleans up pro7.de out of the box

Not from here. Maybe you forgot to remove some custom uBlock filters?

This works for pro7.de though, and I like that they are efficient (low genericity):

##.simad
##.simad ~ div[class] img[src*=".gif"]

Problem is the space gap at the top. Coming to CSS4, there will be the concept "subject", which would be useful to remove the gap at the top in the current case. (Edit: wait.. was this removed from latest CSS4 draft?!) (Edit: I see, this was replaced with :has(), :matches())

my-password-is-password commented 9 years ago

What about these rules for pro7.de?

##.simad + div:not([id])
###ad-fullbanner-outer + div:not([id])
##.grid_300 ~ div:not([id])
gorhill commented 9 years ago

As shown in the thread, ultimately, users creating their own filters is what may work best, as a centralized list like EasyList can easily be monitored by those who wish to prevent users from blocking their ads. More power will come with CSS4, and trying to make it even easier for users to create their own filters is something that can always be improved.

JeremyWW commented 9 years ago

Just an experiment - Ghostery manages to block the ads on pro7.de Not sure how or why...

JeremyWW commented 9 years ago

...and UMatrix is blocking the ads on pro7.de

I have no other extensions installed / enabled. Cleaned the cache and cookies and uMatrix is blocking the ads, even after several refreshes.

gorhill commented 9 years ago

Oops, I meant #383 for the commit.

gorhill commented 9 years ago

Not sure how or why...

Looks preventing one of the EasyList filter causes the site to display no ads at all:

@@/static/ad_$domain=prosieben.de

So the site is detecting whether EasyList is in use by having resources on the page which match EasyList's /static/ad_ and see if the resources are blocked.

JeremyWW commented 9 years ago

Never thought of trying that (and would anyone...) - I unticked Easylist in uBlock, refreshed pro7.de and... no ads!

gorhill commented 9 years ago

I added the exception in uBlock's filters. I am curious to see how long it will be effective. I am assuming they are monitoring changes to EasyList, I doubt they care about here.

JeremyWW commented 9 years ago

I doubt it too. That exception seems to work.

EDIT: Seems that disabling Easylist sorts most of the ad problems out on the other two sites as well - focus & gala.

Another EDIT: So much for Easylist...I'll do without I think.

ryanbr commented 9 years ago

How about adding Easylist Germany? does it help?