Fix Il Secolo XIX (mobile)

This commit is contained in:
magnolia1234 2021-09-05 08:48:23 +02:00
parent 6c1bf39ed5
commit 6f33d8713f
3 changed files with 26 additions and 9 deletions

View File

@ -5,7 +5,8 @@ Post-release
Remove WirtschaftsWoche (obsolete)
Fix Estadao.com.br
Fix Handelsblatt (only non-premium articles)
Fix ilFattoQuotidiano.it
Fix Il Fatto Quotidiano
Fix Il Secolo XIX (mobile)
Fix NzHerald
Fix shz.de & svz.de
@ -622,7 +623,7 @@ Update paywall scripts: MatherAnalytics
* v1.7.7.0 (2020-06-28)
Add ABC.es
Add ilFattoQuotidiano.it
Add Il Fatto Quotidiano (Italy)
Add Knack.be
Add Slader
Fix Quartz (non-premium)

View File

@ -1094,12 +1094,28 @@ else if (matchDomain('rep.repubblica.it')) {
else if (domain = matchDomain(it_repubblica_domains)) {
let url = window.location.href.split('?')[0];
if (!url.match(/\amp(\/)?$/)) {
if (!['ilsecoloxix.it', 'lastampa.it', 'repubblica.it'].includes(domain)) {
window.setTimeout(function () {
let article_body = document.querySelector('div#article-body[style]');
if (article_body)
article_body.removeAttribute('style');
}, 1000); // Delay (in milliseconds)
if (['ilsecoloxix.it', 'lastampa.it', 'repubblica.it'].includes(domain)) {
let premium = document.querySelector('#paywall, iframe#__limio_frame');
if (premium) {
removeDOMElement(premium);
if (['ilsecoloxix.it', 'lastampa.it', 'repubblica.it'].includes(domain) && !url.includes('/podcast/')) {
let amphtml = document.querySelector('link[rel="amphtml"]');
if (!amphtml)
amphtml = {href: (url.split('?')[0] + '/amp').replace('//amp', '/amp')};
if (amphtml)
window.location.href = amphtml.href;
}
}
} else {
let premium = document.querySelector('.paywall-adagio');
if (premium) {
removeDOMElement(premium);
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;

View File

@ -553,5 +553,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.3.5.4"
"version": "2.3.5.5"
}