Fix Groupe Centre France (text)

This commit is contained in:
magnolia1234 2022-11-30 16:29:53 +01:00
parent 9aa9053a61
commit 38bda7c911
3 changed files with 31 additions and 0 deletions

View file

@ -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

View file

@ -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;

View file

@ -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,