otsmr / cookie-banner-blocker

A cookie banner blocker that removes most cookie and newsletter popups without a blocklist.
https://addons.mozilla.org/de/firefox/addon/cookie-banner-blocker/
MIT License
13 stars 3 forks source link

Removes often whole content instead of banner only #2

Open Dragodraki opened 3 years ago

Dragodraki commented 3 years ago

Detection algorithm needs to be improved. For now it recognize banners very well, but when removing on many websites it removes the whole page content, even the text.

Example URL with v.0.1.8: www.computerbase.de (in 0.1.9 only this one page was fixed) Example URL with v.0.1.9: www.ip-insider.de

Would be great, if not only these pages could be excluded from blocking too much, but also adjust the method of detection for similar cases.

otsmr commented 3 years ago

Mostly it is because the main element position is fixed/absolute and the keyword "cookie" is found in the page.

Ideas

otsmr commented 3 years ago

The same here (https://www.oeffnungszeitenbuch.de), but not with the keyword, but as an overlay. And here: https://consent.google.de/m?continue=https://www.google.de/maps&gl=DE&m=0&pc=m&hl=de&src=1 And here: https://www.askpython.com/

Dragodraki commented 3 years ago

Thank you for checking this. Is it possible to fix it in the next version?

Additional websites with same problem: https://www.storage-insider.de https://www.ip-insider.de https://my.vmware.com/de/web/vmware/downloads/details?productId=742&downloadGroup=VMTOOLS1025

otsmr commented 3 years ago

I will definitely try to fix this with the new update, as it bothers me a lot too.

otsmr commented 3 years ago

So I have now added a small check that a detected element is => 50% of the complete web page is ignored. I hope that helps, that no more whole pages disappear :D.

Code snippet

const percentOfPage = 100 / document.body.innerHTML.length * fixedElement.innerHTML.length;
if (percentOfPage < 50) {
   removeFixedElements.push(fixedElement);
}
otsmr commented 3 years ago

https://www.shift8web.ca https://unleashed-design.de

Dragodraki commented 3 years ago

v. 0.1.9.1 E.g. on email platforms like www.freenet.de (after logging in) everything is blocked also in version 0.1.9.1. I think they have ad banners indeed but here the same problem: it not only block the add, but also delete the menue buttons and everything else.

Dragodraki commented 3 years ago

v. 0.1.9.1 unfortunately all reCAPTCHA are broken with this addon. And also these buttons on Github (when try to editing an older post) don't work anymore.

Maybe you can fix these.

Discostu36 commented 3 years ago

Also removing all content on https://www.bahn.de

LostInTranslation2 commented 2 years ago

Removing also the functionality of the login menu (on the right upper corner) on https://www.vrdh.de/ (Online banking login).

Dragodraki commented 2 years ago

Unfortunately continues to kill sometimes whole website like www.virustotal.com Being independent from blocklists sounds great, but that should happen on a stable base, so that behaviour of a website don't lead to block also all the good elements too - and thats not covered with a whitelist... Maybe you can fix this.

Dragodraki commented 1 year ago

Hey, as I can see, you still support this addon. First of all, thumps up for this (tested you version 0.1.9.2).

But may I ask whether you can try to fix this problem with some websites and Captchas become erased completely? Even visitors on important sites like www.virustotal.com suffer from this. Can you response whether/when it's possible to fix this at all?

Dragodraki commented 1 year ago

still nothing?

Dragodraki commented 1 year ago

Created another ticket with more recent information: https://github.com/otsmr/cookie-banner-blocker/issues/13