Fix Lequipe.fr (json)

This commit is contained in:
magnolia1234 2022-05-09 20:29:25 +02:00
parent a57dbaac8b
commit 8ffce62e97
4 changed files with 9 additions and 2 deletions

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix Lequipe.fr (json)
* v2.6.8.0 (2022-05-08)
Add De Tijd & L'Echo

View file

@ -1362,7 +1362,7 @@ else if (matchDomain('lequipe.fr')) {
window.setTimeout(function () {
ext_api.runtime.sendMessage({request: 'refreshCurrentTab'});
}, 500);
json = json.replace(/keywords:\[([\w\,\$]+)\]/g, "keywords:\"\"").replace(/([{,])([a-zA-Z_]+\d?):/g, "$1\"$2\":").replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3").replace(/},([\w]+),{/g, "},\"$1\",{");
json = json.replace(/keywords:\[([\w\,\$]+)\]/g, "keywords:\"\"").replace(/([{,])([a-zA-Z_]+\d?):/g, "$1\"$2\":").replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3").replace(/},([\w]+),{/g, "},\"$1\",{").replace(/},(\w{2})\]}/g, "},\"$1\"]}");
json = JSON.parse(json);
if (json.items) {
let pars = json.items.filter(x => x.objet && x.objet.paragraphs)[0].objet.paragraphs;
@ -2622,6 +2622,9 @@ else if (matchDomain('enotes.com')) {
let intro = document.querySelectorAll('div.o-rte-text > p:not([class]), div.o-rte-text > h3');
for (let elem of intro)
removeDOMElement(elem);
let section_words = pageContains('p[class="u-align--center"]', /\(The entire section contains/);
let ads = document.querySelectorAll('.ad-hfu');
removeDOMElement(...section_words, ...ads);
}
}

View file

@ -95,6 +95,9 @@
"domain": "mannheimer-morgen.de",
"useragent": "googlebot"
},
"Marketscreener.com (only free articles)": {
"domain": "marketscreener.com"
},
"Medpagetoday.com": {
"domain": "medpagetoday.com"
},

View file

@ -671,5 +671,5 @@
"*://*.wsj.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.6.8.0"
"version": "2.6.8.1"
}