Merge pull request #101 from sub/fix/repubblica-update

Fix repubblica.it after website update
This commit is contained in:
ghost 2019-01-16 18:58:09 -08:00 committed by GitHub
commit 666d85ff1e

View File

@ -6,9 +6,13 @@ if (location.hostname.endsWith('rep.repubblica.it')) {
}
if (location.href.includes('/ws/detail/')) {
const paywall = document.querySelector('.paywall[amp-access-hide]');
const paywall = document.querySelector('.paywall[subscriptions-section="content"]');
if (paywall) {
paywall.removeAttribute('amp-access-hide');
paywall.removeAttribute('subscriptions-section');
const preview = document.querySelector('div[subscriptions-section="content-not-granted"]');
if (preview) {
preview.remove();
}
}
}
}