Fix-update La Croix (timing)

master
magnolia1234 2021-02-20 10:18:01 +01:00
parent d914306e90
commit 62a41c7b62
2 changed files with 18 additions and 12 deletions

View File

@ -5,6 +5,7 @@ Post-release
Add Daily Nation (Kenya)
Add Schleswig-Holsteinischer Zeitungsverlag (Germany)
Add Sports Illustrated
Fix-update La Croix (timing)
Grouping Repubblica.it sites (rules only)
Fix incognito window (cookies)

View File

@ -223,6 +223,23 @@ else if (window.location.hostname.endsWith(".com.au") || window.location.hostnam
}
}
else if (matchDomain('la-croix.com')) {
let url = window.location.href;
if (!url.includes('la-croix.com/amp/')) {
let paywall_host_param = document.querySelector('#paywall-host-param');
removeDOMElement(paywall_host_param);
let show_paywall = document.querySelector('#showPayWall');
if (show_paywall)
window.setTimeout(function () {
window.location.reload(true);
}, 500);
} else {
let paywall_block = document.querySelector('#paywall_block');
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');
removeDOMElement(paywall_block, ...amp_ads);
}
}
else if (matchDomain('rep.repubblica.it')) {
window.setTimeout(function () {
if (window.location.href.includes('/pwa/')) {
@ -1724,18 +1741,6 @@ else if (matchDomain("elperiodico.com")) {
}
}
else if (matchDomain('la-croix.com')) {
let url = window.location.href;
if (!url.includes('la-croix.com/amp/')) {
let paywall_host_param = document.querySelector('#paywall-host-param');
removeDOMElement(paywall_host_param);
} else {
let paywall_block = document.querySelector('#paywall_block');
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');
removeDOMElement(paywall_block, ...amp_ads);
}
}
else if (matchDomain('lasegunda.com')) {
let url = window.location.href;
if (url.includes('digital.lasegunda.com/mobile')) {