From 759af025dc4e96b3abb15489aab7de094bf64f6f Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 29 Mar 2024 12:38:44 +0100 Subject: [PATCH] Fix Humanite.fr --- changelog.txt | 1 + contentScript.js | 26 ++++---------------------- sites_updated.json | 7 +++++++ 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/changelog.txt b/changelog.txt index 02073b4..f904af2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Post-release Add American Purpose Add Ringier Axel Springer Polska Remove Hbvl.be (fix obsolete) +Fix Humanite.fr Fix LeMonde.fr (bug; update rules) Fix WSJ (intro video) Update custom sites (search) diff --git a/contentScript.js b/contentScript.js index c6a3c45..c16f9f8 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1944,28 +1944,10 @@ else if (matchDomain(fr_groupe_nice_matin_domains)) { else if (matchDomain('humanite.fr')) { let paywall = document.querySelector('div.single__categories svg'); if (paywall && dompurify_loaded) { - let json_script = document.querySelector('script[id="module-sage-index.js-js-extra"]'); - if (json_script) { - csDoneOnce = true; - if (json_script.text.match(/js_vars\s?=\s?/)) { - try { - let json = JSON.parse(json_script.text.split(/js_vars\s?=\s?/)[1].split('};')[0] + '}'); - let json_text = json.post.post_content.split('')[1]; - let article = document.querySelector('div.rich-text > div.gs-row'); - if (article) { - let parser = new DOMParser(); - let doc = parser.parseFromString('