mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-09-20 04:31:07 +02:00
Fix Foreign Policy (Insider)
This commit is contained in:
parent
aecf619e49
commit
a7d6660737
3 changed files with 7 additions and 20 deletions
|
@ -12,6 +12,7 @@ Remove Bnn.de (fix obsolete)
|
|||
Remove LeTemps.ch (fix obsolete)
|
||||
Remove Money.it (fix obsolete)
|
||||
Fix Automobilwoche.de (js)
|
||||
Fix Foreign Policy (Insider)
|
||||
Fix Groupe Centre France (identify sites)
|
||||
Fix Harvard Business Review (script)
|
||||
Fix LeParisien.fr (amp-redirect)
|
||||
|
|
|
@ -3967,25 +3967,11 @@ else if (matchDomain('foreignpolicy.com')) {
|
|||
removeDOMElement(content_ungated);
|
||||
let content_gated = document.querySelector('div.content-gated');
|
||||
if (content_gated) {
|
||||
content_gated.classList.remove('content-gated');
|
||||
let insider = document.querySelector('body.is-fp-insider');
|
||||
if (insider) {
|
||||
window.setTimeout(function () {
|
||||
let json_script = getArticleJsonScript();
|
||||
if (json_script) {
|
||||
let json = JSON.parse(json_script.text);
|
||||
if (json) {
|
||||
let content = json.Articlebody.replace(/\r\n/g, '<br>');
|
||||
if (content) {
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString('<div style="margin: 50px;">' + DOMPurify.sanitize(content) + '</div>', 'text/html');
|
||||
let content_new = doc.querySelector('div');
|
||||
content_gated.before(content_new);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
if (insider)
|
||||
getJsonUrl('div.content-gated', {rm_class: 'content-gated'}, 'div.content-gated');
|
||||
else
|
||||
content_gated.classList.remove('content-gated');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,12 +106,12 @@
|
|||
"domain": "###_usa_townnews",
|
||||
"block_regex_general": "\\/tncms\\/api\\/access(\\..+)?\\.js",
|
||||
"cs_dompurify": 1,
|
||||
"upd_version": "3.4.1.6",
|
||||
"upd_version": "3.4.1.6"
|
||||
},
|
||||
"Weser-Kurier": {
|
||||
"domain": "weser-kurier.de",
|
||||
"allow_cookies": 1,
|
||||
"block_regex": "\\.piano\\.io\\/",
|
||||
"upd_version": "3.4.6.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue