From ef12ad9d36744cdc048241bdf11971c5e898065f Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 16 Jun 2021 21:38:56 +0200 Subject: [PATCH] Fix-update Atlantico.fr --- changelog.txt | 1 + contentScript.js | 7 +++++-- custom/manifest.json | 2 +- manifest.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index d375e29..5062a28 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release Remove The Northern Star (obsolete) +Fix-update Atlantico.fr Fix-update Boston Globe (no opt-in) Fix-update Foreign Policy Fix-update The Spectator UK (amp) diff --git a/contentScript.js b/contentScript.js index 1be2669..2691523 100755 --- a/contentScript.js +++ b/contentScript.js @@ -729,7 +729,7 @@ if (matchDomain('alternatives-economiques.fr')) { } else if (matchDomain('atlantico.fr')) { - let paywall = document.querySelector('div.markup'); + let paywall = document.querySelector('div.markup[class*="Paywall"]'); if (paywall) paywall.setAttribute('class', 'markup'); } @@ -1347,7 +1347,10 @@ else if (matchDomain('telegraaf.nl')) { removeDOMElement(article_body_old); let json = document.querySelector('script[type="application/ld+json"][data-react-helmet="true"]'); if (json) { - var json_text = JSON.parse(json.text).articleBody; + let json_text = JSON.parse(json.text).articleBody; + let intro = document.querySelector('span[id^="articleIntro"]'); + if (intro) + json_text = json_text.replace(intro.innerText + '\n\n', ''); let article_body = document.querySelector('section.TextArticlePage__bodyText'); if (article_body) { let div_main = document.createElement('div'); diff --git a/custom/manifest.json b/custom/manifest.json index 557b257..c0e1ec8 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -30,5 +30,5 @@ "webRequestBlocking", "" ], - "version": "2.2.5.3" + "version": "2.2.5.4" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index a254412..1449db3 100755 --- a/manifest.json +++ b/manifest.json @@ -513,5 +513,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.2.5.3" + "version": "2.2.5.4" } \ No newline at end of file