From 4fea5c7150dd552f60db763ace76f7cb5fe1770c Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 30 Aug 2022 19:15:08 +0200 Subject: [PATCH] Fix L'Opinion.fr --- changelog.txt | 1 + contentScript.js | 8 ++++++++ custom/manifest.json | 2 +- manifest.json | 2 +- sites_updated.json | 5 +++++ 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 7cca637..c138c51 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release Remove Dark Reading (no paywall) Fix Australian Community Media (overlay) +Fix L'Opinion.fr Fix The Toronto Star * v2.8.2.0 (2022-08-28) diff --git a/contentScript.js b/contentScript.js index a77f675..06faa6c 100755 --- a/contentScript.js +++ b/contentScript.js @@ -1458,6 +1458,14 @@ else if (matchDomain('loeildelaphotographie.com')) { else if (matchDomain('lopinion.fr')) { if (window.location.search.startsWith('?_amp=true')) amp_unhide_access_hide('="access"', '="NOT access"'); + else { + let paywall = document.querySelector('div#poool-widget'); + let amphtml = document.querySelector('link[rel="amphtml"]'); + if (paywall && amphtml) { + removeDOMElement(paywall); + window.location.href = amphtml.href; + } + } } else if (matchDomain('marianne.net')) { diff --git a/custom/manifest.json b/custom/manifest.json index 2ef6d6d..cc0132f 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -43,5 +43,5 @@ "webRequestBlocking", "" ], - "version": "2.8.2.1" + "version": "2.8.2.2" } diff --git a/manifest.json b/manifest.json index 6976da2..44718bc 100755 --- a/manifest.json +++ b/manifest.json @@ -687,5 +687,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.8.2.1" + "version": "2.8.2.2" } diff --git a/sites_updated.json b/sites_updated.json index b06d6b4..52273f5 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -44,6 +44,11 @@ } ] }, + "L'Opinion": { + "domain": "lopinion.fr", + "block_regex": "(\\.poool\\.fr\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)", + "amp_redirect": "div#poool-widget" + }, "La Vie": { "domain": "lavie.fr", "allow_cookies": 1,