mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 07:37:47 +01: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 LeTemps.ch (fix obsolete)
|
||||||
Remove Money.it (fix obsolete)
|
Remove Money.it (fix obsolete)
|
||||||
Fix Automobilwoche.de (js)
|
Fix Automobilwoche.de (js)
|
||||||
|
Fix Foreign Policy (Insider)
|
||||||
Fix Groupe Centre France (identify sites)
|
Fix Groupe Centre France (identify sites)
|
||||||
Fix Harvard Business Review (script)
|
Fix Harvard Business Review (script)
|
||||||
Fix LeParisien.fr (amp-redirect)
|
Fix LeParisien.fr (amp-redirect)
|
||||||
|
|
|
@ -3967,25 +3967,11 @@ else if (matchDomain('foreignpolicy.com')) {
|
||||||
removeDOMElement(content_ungated);
|
removeDOMElement(content_ungated);
|
||||||
let content_gated = document.querySelector('div.content-gated');
|
let content_gated = document.querySelector('div.content-gated');
|
||||||
if (content_gated) {
|
if (content_gated) {
|
||||||
content_gated.classList.remove('content-gated');
|
|
||||||
let insider = document.querySelector('body.is-fp-insider');
|
let insider = document.querySelector('body.is-fp-insider');
|
||||||
if (insider) {
|
if (insider)
|
||||||
window.setTimeout(function () {
|
getJsonUrl('div.content-gated', {rm_class: 'content-gated'}, 'div.content-gated');
|
||||||
let json_script = getArticleJsonScript();
|
else
|
||||||
if (json_script) {
|
content_gated.classList.remove('content-gated');
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
"domain": "###_usa_townnews",
|
"domain": "###_usa_townnews",
|
||||||
"block_regex_general": "\\/tncms\\/api\\/access(\\..+)?\\.js",
|
"block_regex_general": "\\/tncms\\/api\\/access(\\..+)?\\.js",
|
||||||
"cs_dompurify": 1,
|
"cs_dompurify": 1,
|
||||||
"upd_version": "3.4.1.6",
|
"upd_version": "3.4.1.6"
|
||||||
|
},
|
||||||
"Weser-Kurier": {
|
"Weser-Kurier": {
|
||||||
"domain": "weser-kurier.de",
|
"domain": "weser-kurier.de",
|
||||||
"allow_cookies": 1,
|
"allow_cookies": 1,
|
||||||
"block_regex": "\\.piano\\.io\\/",
|
"block_regex": "\\.piano\\.io\\/",
|
||||||
"upd_version": "3.4.6.4"
|
"upd_version": "3.4.6.4"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue