diff --git a/changelog.txt b/changelog.txt index c42bc1f..ace67fa 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Post-release Add Welt.de (link to archive.is) Remove BusinessPost.ie (fix obsolete) Remove Philonomist (fix obsolete) +Fix Groupe Centre France (text) * v2.9.5.0 (2022-11-27) Add Haaretz.co.il & The Marker diff --git a/contentScript.js b/contentScript.js index dfad76d..1b45da2 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1647,6 +1647,27 @@ else if (matchDomain(['sudouest.fr', 'charentelibre.fr', 'larepubliquedespyrenee }, 500); } +else if (matchDomain('lamontagne.fr') || document.querySelector('ul.list-inline > li > a[href="https://www.centrefrance.com/"]')) {// Groupe Centre France + let paywall = document.querySelector('div#poool-widget'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let content = document.querySelector('div.entry-content'); + if (json_text && content) { + content.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.appendChild(article_new); + } + } + } + } +} + else csDone = true; diff --git a/sites_updated.json b/sites_updated.json index 3262665..9e4732b 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,13 @@ { + "Groupe Centre France": { + "domain": "###_fr_gcf", + "group": [ + "lamontagne.fr" + ], + "allow_cookies": 1, + "block_regex": "\\.poool\\.fr\\/", + "ld_json": "div#poool-widget|div.entry-content" + }, "La Vanguardia": { "domain": "lavanguardia.com", "allow_cookies": 1,