From e611f56153c785a5c099df68421f1fb0c510c5b0 Mon Sep 17 00:00:00 2001 From: Davide Saurino Date: Tue, 11 Dec 2018 12:02:43 +0100 Subject: [PATCH] Fix repubblica.it after page reload --- contentScript.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contentScript.js b/contentScript.js index 5fcec35..be6313c 100644 --- a/contentScript.js +++ b/contentScript.js @@ -35,9 +35,9 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) { } if (location.href.includes("/ws/detail/")) { - const paywall = document.getElementsByClassName('paywall'); - if (paywall && paywall.length > 0) { - paywall[0].toggleAttribute('amp-access-hide'); + const paywall = document.querySelector('.paywall[amp-access-hide]'); + if (paywall) { + paywall.removeAttribute('amp-access-hide'); } } }