A cookie banner blocker that removes most cookie and newsletter popups without a blocklist.
 
 
 
 
Go to file
Tobi 268f4f0d4c
Add maintenance note
2023-04-06 13:45:28 +02:00
background handle QuotaExceededError 2021-04-12 22:00:53 +02:00
content Exclude invalid css names from selector 2022-10-22 12:21:25 +02:00
docs block banner at bahn.de 2022-01-16 14:05:23 +01:00
icons initial commit 2021-01-24 21:10:25 +01:00
options create option page template 2021-02-07 21:19:50 +01:00
tests block banner at bahn.de 2022-01-16 14:05:23 +01:00
.gitignore add web-ext-artifacts 2021-04-12 22:09:20 +02:00
LICENSE new feature: prevent cookie banner redirects 2021-02-06 19:16:10 +01:00
README.md Add maintenance note 2023-04-06 13:45:28 +02:00
manifest.json update version 2021-05-30 22:18:29 +02:00
run.bat initial commit 2021-01-24 21:10:25 +01:00
run.sh check only possible tags and mutation records 2021-02-04 21:45:50 +01:00
zip.sh update version 2021-05-30 22:18:29 +02:00

README.md

Cookie Banner Blocker

A cookie banner blocker that removes most cookie and newsletter pop-ups without a block list.
It also detects so-called "consent cookie banner pages" that redirect to a separate consent page before opening the actual page.

I started the project out of frustation, because the cookie banners annoy me a lot. Since I use the addon in combination with uBlock Origin, I barely see cookie banners anymore, so the project is finished for me. You are welcome to develop the project further, by forking it.

Firefox Addons

Video

Goal of the project

There is already the possibility to block cookie banners via blocklists (among others also with the uBlock Origin). However, this project aims to detect and hide "new" banners or redirect banners without a blocklist (without giving consent).

Unfortunately, the detection is not perfect, so there is the possibility to deactivate the cookie banner blocker with just one click for a single page:

disable-cookie-banner-blocker

How does the recognition work?

I could identify three different categories of banners.

These are usually located at the bottom of the page and are very annoying due to their intrusive colour. They can be recognised by the fact that they are fixed (position: fixed) and often have a high Z-index. Since this also applies to most navigations, additional searches are made for keywords (cookie :)).

Overlay-Banner

These particularly prominent banners blur the background and make the page unusable until accepted. These banners reveal themselves by the fact that they are fixed and have the same size as the actual page. If such an overlay is found, all elements with a higher Z-index are removed. In addition, a CSS rule is inserted that overrides the anti-scrolling rules of the page.

Redirect-Banner

This category of banners redirect the user to a separate "consent cookie banner pages". They are detected by keywords in the url and the fact that the previous url is usually contained in a GET parameter. The redirection is prevented by changing the user agent to a search engine user agent. After that, there is no need to give consent. After all, the pages still want to be crawled by Google and co.

Setup

npm i -g web-ext

Credits

I was inspired by this Project
The icons are from Font Awesome