From 2a1b1ab831d83522ba3a01a52718342b1ba11f69 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 22 Jul 2022 18:39:59 +0200 Subject: [PATCH] Fix Le Devoir (cookie) --- background.js | 1 + changelog.txt | 1 + contentScript.js | 12 ++++++------ manifest.json | 2 +- sites.js | 4 ++-- sites_updated.json | 5 +++++ 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/background.js b/background.js index 9ed1b54..c735e0c 100644 --- a/background.js +++ b/background.js @@ -24,6 +24,7 @@ var restrictions = { 'faz.net': /^((?!\.faz\.net\/aktuell\/(\?switchfaznet)?$).)*$/, 'globo.com': /^((?!\/valor\.globo\.com\/).)*$/, 'lastampa.it': /^((?!\/video\.lastampa\.it\/).)*$/, + 'theatlantic.com': /^((?!\/newsletters\.theatlantic\.com\/).)*$/, 'nytimes.com': /^((?!\/timesmachine\.nytimes\.com\/).)*$/, 'science.org': /^((?!\.science\.org\/doi\/).)*$/, 'timesofindia.com': /\.timesofindia\.com($|\/($|toi-plus(\/.+)?|.+\.cms))/, diff --git a/changelog.txt b/changelog.txt index 6cc6d3d..b5be4cf 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ Add StuDocu (no downloads) Remove The Ken (fix not working) Fix Foreign Affairs (js) Fix Krautreporter.de +Fix Le Devoir (cookie) Fix Scientific American (magazine) * v2.7.6.0 (2022-07-17) diff --git a/contentScript.js b/contentScript.js index 6db2ba4..c516626 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1194,7 +1194,7 @@ else if (matchDomain('politicaexterior.com')) { else csDone = true; -} else if (window.location.hostname.endsWith('.fr') || matchDomain(['bienpublic.com', 'connaissancedesarts.com', 'journaldunet.com', 'la-croix.com', 'lavenir.net', 'ledauphine.com', 'ledevoir.com', 'lesinrocks.com', 'lejsl.com', 'loeildelaphotographie.com', 'marianne.net', 'nouvelobs.com', 'parismatch.com', 'science-et-vie.com'].concat(fr_groupe_nice_matin_domains))) {//france +} else if (window.location.hostname.endsWith('.fr') || matchDomain(['bienpublic.com', 'connaissancedesarts.com', 'journaldunet.com', 'la-croix.com', 'lavenir.net', 'ledauphine.com', 'lesinrocks.com', 'lejsl.com', 'loeildelaphotographie.com', 'marianne.net', 'nouvelobs.com', 'parismatch.com', 'science-et-vie.com'].concat(fr_groupe_nice_matin_domains))) {//france if (matchDomain('alternatives-economiques.fr')) { window.setTimeout(function () { @@ -1344,11 +1344,6 @@ else if (matchDomain('lavenir.net')) { removeDOMElement(...ads); } -else if (matchDomain('ledevoir.com')) { - let counter = document.querySelector('.popup-msg'); - removeDOMElement(counter); -} - else if (matchDomain(['lejdd.fr', 'parismatch.com'])) { let poool_banner = document.querySelector('#poool-container'); let forbidden = document.querySelector('.forbidden'); @@ -3091,6 +3086,11 @@ else if (matchDomain('law360.com')) { }, 500); } +else if (matchDomain('ledevoir.com')) { + let counter = document.querySelector('.paywall-breakpoint-wrapper'); + removeDOMElement(counter); +} + else if (matchDomain('livelaw.in')) { let paywall = document.querySelector('div#subscription_paid_message, div.subscribeNow'); if (paywall) { diff --git a/manifest.json b/manifest.json index 165b037..2c56108 100644 --- a/manifest.json +++ b/manifest.json @@ -694,5 +694,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.7.6.5" + "version": "2.7.6.6" } diff --git a/sites.js b/sites.js index 196fc4e..a211855 100644 --- a/sites.js +++ b/sites.js @@ -1009,8 +1009,8 @@ var defaultSites = { }, "Le Devoir": { domain: "ledevoir.com", - allow_cookies: 1, - block_regex: /\.tinypass\.com\// + block_regex: /\.tinypass\.com\//, + remove_cookies_select_drop: ["pw6"] }, "Le Journal du Dimanche": { domain: "lejdd.fr", diff --git a/sites_updated.json b/sites_updated.json index bc1abc2..2e1aacc 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -22,6 +22,11 @@ } ] }, + "Le Devoir": { + "domain": "ledevoir.com", + "block_regex": "\\.tinypass\\.com\\/", + "remove_cookies_select_drop": ["pw6"] + }, "NRC Handelsblad": { "domain": "nrc.nl", "remove_cookies_select_drop": ["counter"],