From 47de7fcf8a2d49424b5342fbc2a13c1b3615961a Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 29 Oct 2021 08:48:10 +0200 Subject: [PATCH] Fix Westfaelische Nachrichten & Westfalen-Blatt --- changelog.txt | 1 + contentScript.js | 15 ++++++++++++--- custom/manifest.json | 2 +- manifest.json | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 54c537c..9081e1b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release +Fix Westfaelische Nachrichten & Westfalen-Blatt * v2.4.1.3 (2021-10-28) Fix Repubblica sites (disable Googlebot) diff --git a/contentScript.js b/contentScript.js index 742b11d..641ff68 100755 --- a/contentScript.js +++ b/contentScript.js @@ -568,9 +568,15 @@ else if (matchDomain(['westfalen-blatt.de', 'wn.de'])) { let subscr_sections = document.querySelectorAll('section[subscriptions-section="content"]'); for (let subscr_section of subscr_sections) subscr_section.removeAttribute('subscriptions-section'); + let amp_ads = document.querySelectorAll('amp-ad, amp-embed, section[class^="fp-ad"]'); + removeDOMElement(...amp_ads); + } else { + let paywall = document.querySelector('.fp-article-paywall'); + if (paywall) { + removeDOMElement(paywall); + window.location.href = url.replace('.de/', '.de/amp/'); + } } - let amp_ads = document.querySelectorAll('amp-ad, section[class^="fp-ad"]'); - removeDOMElement(...amp_ads); } else if ((domain = matchDomain(de_madsack_domains)) || document.querySelector('link[rel="preload"][href="https://static.rndtech.de/cmp/1.x.x.js"]')) { @@ -1707,7 +1713,7 @@ else if (matchDomain('bloombergquint.com')) { } else if (matchDomain('bostonglobe.com')) { - let paywall = document.querySelector('div.meter-paywall'); + let paywall = document.querySelector('div.meter-paywall, div.incognito-paywall'); let fade = document.querySelector('div.fade'); if (paywall || fade) { removeDOMElement(paywall); @@ -1718,6 +1724,9 @@ else if (matchDomain('bostonglobe.com')) { if (continue_button) continue_button.click(); } + let ads = document.querySelectorAll('div.arc_ad'); + for (let ad of ads) + ad.style = 'display:none'; } else if (matchDomain('business-standard.com')) { diff --git a/custom/manifest.json b/custom/manifest.json index e8f7b10..e3dbe31 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -39,5 +39,5 @@ "webRequestBlocking", "" ], - "version": "2.4.1.3" + "version": "2.4.1.4" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index da80af2..e1d4f42 100755 --- a/manifest.json +++ b/manifest.json @@ -544,5 +544,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.4.1.3" + "version": "2.4.1.4" } \ No newline at end of file