From 53c04189cefce74ea17d726a895957e7a77b1d14 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 15 Oct 2023 17:21:48 +0200 Subject: [PATCH] Fix Harvard Business Review (subscriber-only) --- changelog.txt | 1 + contentScript.js | 12 +++++------- custom/manifest.json | 2 +- manifest.json | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/changelog.txt b/changelog.txt index 840fdddc..cea7c4dd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,6 +9,7 @@ Remove Mediahuis Nederland Regional (fix obsolete) Fix Belfast Telegraph/Independent.ie (images) Fix BusinessPost.ie (js) Fix Estadao.com.br (js) +Fix Harvard Business Review (subscriber-only) Fix NyTeknik.se Fix Tuttosport (image) Fix Unherd (css) diff --git a/contentScript.js b/contentScript.js index 3dc020e7..2777999a 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3994,17 +3994,15 @@ else if (matchDomain('ftm.eu')) { } else if (matchDomain('hbr.org')) { + function hbr_main() { + window.top.postMessage({type: 'article-paywall:full-content'}, '*'); + } let popup = document.querySelector('.persistent-banner'); removeDOMElement(popup); let paywall = document.querySelector('site-paywall'); - if (paywall) {//legacy + if (paywall) { removeDOMElement(paywall); - let intro = document.querySelector('.article-ideainbrief'); - if (intro) - intro.removeAttribute('class'); - let main_hidden = document.querySelector('div#main[style]'); - if (main_hidden) - main_hidden.removeAttribute('style'); + insert_script(hbr_main); } } diff --git a/custom/manifest.json b/custom/manifest.json index 93613237..3043deb7 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.3.7.8" + "version": "3.3.7.9" } diff --git a/manifest.json b/manifest.json index 4219b669..f6008c3b 100644 --- a/manifest.json +++ b/manifest.json @@ -800,5 +800,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.3.7.8" + "version": "3.3.7.9" }