dhowe / AdNauseam

AdNauseam: Fight back against advertising surveillance
GNU General Public License v3.0
4.54k stars 190 forks source link

Ads visible in adnauseam but hidden in uBlock Origin #1532

Closed Ledarium closed 4 years ago

Ledarium commented 5 years ago

Describe the issue

As described in title, those two bars at the sides of site are not hidden in adnauseam. They are blocked with uBO, though Site: hdrezka.horse

Screenshot in which the issue can be seen

AdNauseam only, other extensions disabled ads list in adnauseam uBO only, other extensions disabled no ads list in ubo

Steps for anyone to reproduce the issue

Install latest AdNauseam on latest Firefox Go to hdrezka.horse.

Your settings

Your filter lists

Default filter lists + RUS: AdGuard Russian + RUS: RU AdList, as seen on screenshot

Your location/country

Russia

cqx931 commented 5 years ago

Hi @Ledarium this issue should be fixed by https://github.com/dhowe/AdNauseam/commit/0153e78b4ea74f82c82d8ab5a3969afdfd4fa87c Could you please update the adnauseam filter list and verify the issue? Thank you!

Ledarium commented 5 years ago

@cqx931 yep it works, thank you. I don't think it's a proper solution though. I mean, ublock doesn't use this explicit filter yet still blocks those ads somehow, so maybe we should look into this problem further IMO. Would like to help if needed

cqx931 commented 5 years ago

Thank you for your interest in the project! @Ledarium The major difference between uBlock and AdNauseam is that in AdNauseam we want to click and collect ads whenever it's possible. Therefore, many blocking filters are not used as we do want the ads to be generated first so that we can try to collect them using cosmetic filters. If you check the logger, blocking filter on 3rd party braun634.com requests plus other cosmetic filters from from RU AdList are the main reasons why you don't see this ad in uBlock. So I added back this blocking filter to hide the ads, and because adnauseam doesn't support ad collection from background images yet, they are left uncollected by adnauseam. You can find more about how hiding/blocking works in adnauseam in this wiki page

If you think there is a better way to solve this issue here, I'm also happy to hear it!

Ledarium commented 5 years ago

@cqx931 understood, thanks! Is there any work going on implementing background images clicking? Is it necessary to add that feature into ADN?

dhowe commented 5 years ago

This would be nice. @cqx931 what would be required? Does ublock allow cosmetic filters for background images?

cqx931 commented 5 years ago

@dhowe I remember that I have done some work on this very long time ago... shouldn't be very difficult based on what we have now. See: https://github.com/dhowe/AdNauseam/issues/451. I can focus on this and text-ad parsing next time when I work again.

It's more about ad collecting. There is no major difference(at least I didn't notice any) on cosmetic filters between background images and real images.

cqx931 commented 5 years ago

More about how ad hiding is working in this particular scenario:

hdrezka.horse##body:not(#id):style(padding-top: 0 !important) 
hdrezka.horse##body:not(#id):style(background-image: none !important)

See :style() The background image ad in the body tag is hidden by modifying the original css rules, instead of hiding the whole tag.

Currently AdNauseam does support simple background ads our parser don't get to parse all the cosmetic filters in the current mechanism(still need to look into this). In this case for example, AdNauseam parser is triggered on HTML but not on body tag.

It's also important for AdNauseam to get the background image before uBlock modifies the css rules. (procedural filters)

cqx931 commented 4 years ago

close for now