Fix-update Repubblica.it

This commit is contained in:
magnolia1234 2021-05-16 17:37:08 +02:00
parent 13b169a7f9
commit 069ee38673
3 changed files with 18 additions and 10 deletions

View file

@ -9,6 +9,7 @@ Fix-update Crain's Chicago Business
Fix-update GenomeWeb sites
Fix-update Knack.be
Fix-update LeScienze.it
Fix-update Repubblica.it
Fix-update South China Morning Post (amp)
* v2.2.0.0 (2021-05-09)

View file

@ -1066,15 +1066,22 @@ else if (domain = matchDomain(it_repubblica_domains)) {
let url = window.location.href;
if (!url.includes('/amp/')) {
let premium = document.querySelector('.paywall-adagio, #paywall');
removeDOMElement(premium);
window.setTimeout(function () {
let amphtml = document.querySelector('link[rel="amphtml"]');
if (premium && amphtml && (['lastampa.it', 'repubblica.it'].includes(domain)))
window.location.href = amphtml.href;
let article_body = document.querySelector('div#article-body[style]');
if (article_body)
article_body.removeAttribute('style');
}, 500); // Delay (in milliseconds)
if (premium) {
removeDOMElement(premium);
if (['lastampa.it', 'repubblica.it'].includes(domain)) {
let amphtml = document.querySelector('link[rel="amphtml"]');
if (!amphtml)
amphtml = {href: url.split('?')[0] + 'amp'};
if (amphtml)
window.location.href = amphtml.href;
} else {
window.setTimeout(function () {
let article_body = document.querySelector('div#article-body[style]');
if (article_body)
article_body.removeAttribute('style');
}, 1000); // Delay (in milliseconds)
}
}
} else {
let paywall;
if (['lastampa.it', 'repubblica.it'].includes(domain)) {

View file

@ -515,5 +515,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.2.0.8"
"version": "2.2.0.9"
}