An open API service indexing awesome lists of open source software.

https://github.com/dnmfarrell/chrome-accept-cookies

A Chrome extension to automatically accept cookie consent banners so you can get back to browsing. Collects zero data.
https://github.com/dnmfarrell/chrome-accept-cookies

chrome-extension cookie-consent cookie-policy

Last synced: 4 months ago
JSON representation

A Chrome extension to automatically accept cookie consent banners so you can get back to browsing. Collects zero data.

Awesome Lists containing this project

README

        

Accept Cookies
==============
![](icon128.png)

A Chrome extension to automatically accept cookie consent banners so you can get back to browsing. Collects zero data.

Cookie icon designed by FreePik.

What's a cookie consent banner?
--------------------------------
These annoying popups:

![](acceptcookies.png)

How it works
-----------
Rather than hardcoding rules for every website, Accept Cookies uses an algorithm:

1. Searches the DOM and shadow DOMs for elements mentioning cookies.
2. Searches for accept buttons with a common ancestor to the cookie elements.
3. Calculates the distance between every accept button and cookie element pair.
4. Clicks the accept button closest to a cookie element.

Technical details
-----------------
- Uses mutation observers to efficiently react to DOM changes.
- Overrides `Element.attachShadow` to search shadow DOMs.
- Uses a service worker with `chrome.webNavigation.onCommitted.addListener` to override `.attachShadow` before inline code runs.
- Runs in all frames so cookie consent banners loaded in iFrames are detected.

Installation
------------
1. Clone/download this repo.
2. Go to the Chrome Extensions page by entering chrome://extensions in a new tab.
3. Enable Developer Mode by clicking the toggle switch next to it.
4. Click the Load unpacked button.
5. Select the downloaded repo directory.

See also
--------
[I Still Don't Care About Cookies](https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies).