mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 07:57:48 +01:00
Fix-update Faz.net (error in json)
This commit is contained in:
parent
a4b3524cfb
commit
586725cd23
2 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,7 @@ Post-release
|
||||||
Add El Periodico (Spain)
|
Add El Periodico (Spain)
|
||||||
Add Grupo Vocento (Spain, regional daily)
|
Add Grupo Vocento (Spain, regional daily)
|
||||||
Fix-update Corriere Della Sera (redirect preview)
|
Fix-update Corriere Della Sera (redirect preview)
|
||||||
|
Fix-update Faz.net (error in json)
|
||||||
Fix popup (update notification & close error)
|
Fix popup (update notification & close error)
|
||||||
Update block general paywall script (Pelcro)
|
Update block general paywall script (Pelcro)
|
||||||
Update grouped sites (init rules)
|
Update grouped sites (init rules)
|
||||||
|
|
|
@ -810,7 +810,10 @@ else if (matchDomain('faz.net')) {
|
||||||
var doc = parser.parseFromString(html, 'text/html');
|
var doc = parser.parseFromString(html, 'text/html');
|
||||||
let json = doc.querySelector('script[id="schemaOrgJson"]');
|
let json = doc.querySelector('script[id="schemaOrgJson"]');
|
||||||
if (json) {
|
if (json) {
|
||||||
var json_text = JSON.parse(json.text).ArticleBody;
|
let split1 = json.text.split('"ArticleBody": "');
|
||||||
|
let split2 = split1[1].split('","author":');
|
||||||
|
var json_text_clean = split1[0] + '"ArticleBody": "' + split2[0].replace(/"/g, '“') + '","author":' + split2[1];
|
||||||
|
var json_text = JSON.parse(json_text_clean).ArticleBody;
|
||||||
let article_text = document.querySelector('.art_txt.paywall,.atc-Text.js-atc-Text');
|
let article_text = document.querySelector('.art_txt.paywall,.atc-Text.js-atc-Text');
|
||||||
article_text.innerText = '';
|
article_text.innerText = '';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue