From 99cbc51164963b6e54be0bcdb3b07ac73e803349 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 22 Oct 2022 11:24:37 +0200 Subject: [PATCH] Add Humanite.fr --- README.md | 1 + changelog.txt | 1 + contentScript.js | 13 +++++++++++++ manifest.json | 3 ++- sites.js | 5 +++++ sites_updated.json | 5 +++++ 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5356646a..72f5457b 100644 --- a/README.md +++ b/README.md @@ -429,6 +429,7 @@ Grouped in options:\ [L'Écho](https://lecho.be) - [L'Équipe](https://www.lequipe.fr) - [L'Express](https://www.lexpress.fr) - +[L'Humanité](https://www.humanite.fr) - [L'Obs](https://www.nouvelobs.com) - [L'Oeil de la Photographie (fr/en)](https://loeildelaphotographie.com) - [L'Opinion](https://www.lopinion.fr) - diff --git a/changelog.txt b/changelog.txt index 46c9d70e..fd9afce9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add Humanite.fr Remove Daily Nation (no paywall) Fix ABC.es (Sevilla) Fix ESPN USA (link to archive.is) diff --git a/contentScript.js b/contentScript.js index d2ec4062..16d86efa 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1256,6 +1256,19 @@ else if (matchDomain('franc-tireur.fr')) { removeDOMElement(paywall); } +else if (matchDomain('humanite.fr')) { + if (window.location.search.startsWith('?amp')) { + let qiota_script = document.querySelector('amp-script[src^="https://www.qiota.com/"]'); + if (qiota_script) { + let amphtml_fill_content = qiota_script.querySelector('div.i-amphtml-fill-content'); + if (amphtml_fill_content) + amphtml_fill_content.removeAttribute('class'); + let i_amphtml_sizer = qiota_script.querySelector('i-amphtml-sizer'); + removeDOMElement(i_amphtml_sizer); + } + } +} + else if (matchDomain('journaldunet.com')) { let reg_wall = document.querySelector('.reg_wall'); removeDOMElement(reg_wall); diff --git a/manifest.json b/manifest.json index e8be7922..4e0518f5 100644 --- a/manifest.json +++ b/manifest.json @@ -275,6 +275,7 @@ "*://*.houstonchronicle.com/*", "*://*.hoy.es/*", "*://*.huffingtonpost.it/*", + "*://*.humanite.fr/*", "*://*.humo.be/*", "*://*.ideal.es/*", "*://*.ijmuidercourant.nl/*", @@ -719,5 +720,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.8.9.3" + "version": "2.8.9.4" } diff --git a/sites.js b/sites.js index 0b66ecb0..5a240caf 100644 --- a/sites.js +++ b/sites.js @@ -969,6 +969,11 @@ var defaultSites = { allow_cookies: 1, block_regex: /\.qiota\.com\// }, + "L'Humanité": { + domain: "humanite.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, "L'Obs": { domain: "nouvelobs.com", allow_cookies: 1, diff --git a/sites_updated.json b/sites_updated.json index 55f281bb..d77f3a65 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -42,6 +42,11 @@ "allow_cookies": 1, "block_regex": "\\.tinypass\\.com\\/" }, + "L'Humanité": { + "domain": "humanite.fr", + "allow_cookies": 1, + "block_regex": "\\.qiota\\.com\\/" + }, "The Washington Post": { "domain": "washingtonpost.com", "allow_cookies": 1,