From 59f2997bc9e425c2845cc71ef4aeed657e823d48 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 21 Feb 2023 18:24:43 +0100 Subject: [PATCH] Fix Harper's Magazine (modal) --- changelog.txt | 1 + contentScript.js | 8 -------- sites.js | 3 ++- sites_updated.json | 4 ++++ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/changelog.txt b/changelog.txt index 8b87f4b..83fa01a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Post-release Add LosAndes.com.ar (Grupo Clarin) Remove Hln.be (fix obsolete) Remove Lequipe.fr (fix obsolete) +Fix Harper's Magazine (modal) Fix NK News (pro) Fix Quartz (newsletter) diff --git a/contentScript.js b/contentScript.js index be4f1f7..b47fd08 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3344,14 +3344,6 @@ else if (matchDomain('griffithreview.com')) { removeDOMElement(subscribe); } -else if (matchDomain('harpers.org')) { - let overlay = document.querySelector('div[id^="pum-"]'); - removeDOMElement(overlay); - let entry_content = document.querySelectorAll('.entry-content'); - for (let elem of entry_content) - elem.setAttribute('style', 'display: block !important'); -} - else if (matchDomain('hbr.org')) { let popup = document.querySelector('.persistent-banner'); removeDOMElement(popup); diff --git a/sites.js b/sites.js index 1c75951..5fd3b2d 100644 --- a/sites.js +++ b/sites.js @@ -857,7 +857,8 @@ var defaultSites = { useragent: "googlebot" }, "Harper's Magazine": { - domain: "harpers.org" + domain: "harpers.org", + block_regex: /\/harpers\.org\/wp-content\/themes\/timber\/static\/js\/modal.+\.js/ }, "Harvard Business Review": { domain: "hbr.org", diff --git a/sites_updated.json b/sites_updated.json index 8112c34..669755a 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -31,6 +31,10 @@ "allow_cookies": 1, "block_regex": "(\\.abril\\.com\\.br\\/.+\\/abril-paywall\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)" }, + "Harper's Magazine": { + "domain": "harpers.org", + "block_regex": "\\/harpers\\.org\\/wp-content\\/themes\\/timber\\/static\\/js\\/modal.+\\.js" + }, "Inside Higher Ed": { "domain": "insidehighered.com", "allow_cookies": 1,