|
|
|
@ -3554,10 +3554,31 @@ else if (matchDomain('foreignaffairs.com')) {
|
|
|
|
|
|
|
|
|
|
else if (matchDomain('foreignpolicy.com')) {
|
|
|
|
|
let content_ungated = document.querySelector('div.content-ungated');
|
|
|
|
|
removeDOMElement(content_ungated);
|
|
|
|
|
let content_gated = document.querySelector('div.content-gated');
|
|
|
|
|
if (content_gated)
|
|
|
|
|
content_gated.classList.remove('content-gated');
|
|
|
|
|
if (content_ungated && dompurify_loaded) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (matchDomain('fortune.com')) {
|
|
|
|
|