|
|
|
@ -1944,28 +1944,10 @@ else if (matchDomain(fr_groupe_nice_matin_domains)) {
|
|
|
|
|
else if (matchDomain('humanite.fr')) {
|
|
|
|
|
let paywall = document.querySelector('div.single__categories svg');
|
|
|
|
|
if (paywall && dompurify_loaded) {
|
|
|
|
|
let json_script = document.querySelector('script[id="module-sage-index.js-js-extra"]');
|
|
|
|
|
if (json_script) {
|
|
|
|
|
csDoneOnce = true;
|
|
|
|
|
if (json_script.text.match(/js_vars\s?=\s?/)) {
|
|
|
|
|
try {
|
|
|
|
|
let json = JSON.parse(json_script.text.split(/js_vars\s?=\s?/)[1].split('};')[0] + '}');
|
|
|
|
|
let json_text = json.post.post_content.split('<!-- /wp:huma/featured-media -->')[1];
|
|
|
|
|
let article = document.querySelector('div.rich-text > div.gs-row');
|
|
|
|
|
if (article) {
|
|
|
|
|
let parser = new DOMParser();
|
|
|
|
|
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(json_text, dompurify_options) + '</div>', 'text/html');
|
|
|
|
|
let article_new = doc.querySelector('div');
|
|
|
|
|
if (article_new) {
|
|
|
|
|
article.innerHTML = '';
|
|
|
|
|
article.appendChild(article_new);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.log(err);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
csDoneOnce = true;
|
|
|
|
|
let url = window.location.href;
|
|
|
|
|
let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split(/[#\?]/)[0];
|
|
|
|
|
replaceDomElementExt(url_cache, true, false, 'div.rich-text > div.gs-row');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|