Fix Repubblica.it (remember to also disable uBlock Origin for this site)

This commit is contained in:
Adam 2022-04-11 21:27:25 -07:00
parent 3a837ab312
commit 0e81cdacfe

View File

@ -19,23 +19,16 @@ if (matchDomain('elmercurio.com')) {
removeDOMElement(paywall);
body.removeAttribute('style');
}, 300); // Delay (in milliseconds)
} else if (matchDomain('repubblica.it')) {
document.addEventListener('DOMContentLoaded', () => {
if (document.querySelector('#paywall')) {
const url = window.location.href.split('?')[0];
window.location.href = url + 'amp';
} else if (window.location.href.includes('/pwa/')) {
setTimeout(function () {
} else if (matchDomain('rep.repubblica.it')) {
window.setTimeout(function () {
if (window.location.href.includes('/pwa/')) {
window.location.href = window.location.href.replace('/pwa/', '/ws/detail/');
}, 400);
}
});
const paywall = document.querySelector('[subscriptions-section="content"]');
}, 500);
if (window.location.href.includes('/ws/detail/')) {
const paywall = document.querySelector('.paywall');
if (paywall) {
paywall.removeAttribute('subscriptions-section');
const preview = document.querySelector('div[subscriptions-section="content-not-granted"]');
if (preview) {
preview.remove();
ampUnhideSubscriptionsSection();
}
}
} else if (matchDomain('americanbanker.com')) {