From 56c924626955aa2d8bb0e39c383f66be3053dec6 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 7 Jan 2020 18:22:51 +0100 Subject: [PATCH] Remove The Athletic trial-banners --- contentScript.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/contentScript.js b/contentScript.js index ae0ce16..2c2f14d 100755 --- a/contentScript.js +++ b/contentScript.js @@ -191,8 +191,8 @@ if (window.location.href.indexOf("thehindu.com") !== -1) { if (window.location.href.indexOf("nytimes.com") !== -1) { const preview_button = document.querySelector('.css-3s1ce0'); - if (preview_button) - preview_button.click(); + if (preview_button) + preview_button.click(); } if (window.location.href.indexOf("economist.com") !== -1) { @@ -357,9 +357,11 @@ if (window.location.href.indexOf("sofrep.com") !== -1) { } if (window.location.href.indexOf("theathletic.com") !== -1) { - const banner = document.querySelector('.border-bottom-cc'); + const landing_banner = document.querySelector('.logged-out-landing-banner'); + const sample_banner = document.querySelector('.main-sample-banner'); + const bottom_banner = document.querySelector('.border-bottom-cc'); const subscribe = document.querySelector('.subscribe-ad-text'); - removeDOMElement(banner, subscribe); + removeDOMElement(landing_banner, sample_banner, bottom_banner, subscribe); } // General Functions