Fix repubblica.it after page reload

This commit is contained in:
Davide Saurino 2018-12-10 16:29:37 +01:00
parent cd24b41e64
commit f4a12b67d5

View File

@ -6,9 +6,9 @@ if (location.hostname.endsWith('rep.repubblica.it')) {
} }
if (location.href.includes('/ws/detail/')) { if (location.href.includes('/ws/detail/')) {
const paywall = document.getElementsByClassName('paywall'); const paywall = document.querySelector('.paywall[amp-access-hide]');
if (paywall && paywall.length > 0) { if (paywall) {
paywall[0].toggleAttribute('amp-access-hide'); paywall.removeAttribute('amp-access-hide');
} }
} }
} }