Skip to content

Instantly share code, notes, and snippets.

@rztprog
Last active June 12, 2026 14:46
Show Gist options
  • Select an option

  • Save rztprog/38b70028ba8f68b6b347bad220bd17f4 to your computer and use it in GitHub Desktop.

Select an option

Save rztprog/38b70028ba8f68b6b347bad220bd17f4 to your computer and use it in GitHub Desktop.
Tampermonkey - Auto refuse cookies consent on 20Minutes.fr
// ==UserScript==
// @name 20Minutes cookies cleaner
// @namespace http://github.com/rztprog
// @version 0.8
// @description Refuse cookies consent and from 20minutes website
// @author Rztprog
// @match https://www.20minutes.fr/*
// @icon https://www.20minutes.fr/favicons/favicon.ico
// @grant none
// ==/UserScript==
(function() {
'use strict';
let timer = null;
let counter = 0;
const cleanCookies = () => {
++counter;
const cookiePopup = document.querySelector("#didomi-popup");
if (cookiePopup) {
clearInterval(timer);
cookiePopup.style.display = "none"
document.querySelector("html").style.overflow = "scroll";
}
if (counter > 50) {
clearInterval(timer);
timer = null;
counter = 0;
}
}
timer = setInterval(cleanCookies, 50);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment