From 3762e8d09854074ba817fa0cbcf11b4e80e0562a Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Mon, 5 Oct 2020 16:31:10 +0200 Subject: [PATCH] Fix-update Bloomberg (overlay) --- background.js | 3 --- changelog.txt | 1 + contentScript.js | 17 ++++++++++++----- lp/manifest.json | 2 +- manifest.json | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/background.js b/background.js index 004b0c5..4754f50 100644 --- a/background.js +++ b/background.js @@ -612,7 +612,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { }); } - if (!['image', 'font', 'stylesheet'].includes(details.type) || matchUrlDomain('afr.com', details.url)) { if (tabId !== -1) { ext_api.tabs.get(tabId, function (currentTab) { if (isSiteEnabled(currentTab) || medium_custom_domain) { @@ -645,7 +644,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { } }); } - } return { requestHeaders: requestHeaders }; }, { @@ -813,4 +811,3 @@ function getParameterByName(name, url) { function stripQueryStringAndHashFromPath(url) { return url.split("?")[0].split("#")[0]; } - diff --git a/changelog.txt b/changelog.txt index d90c8b9..57984dc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix-update Bloomberg (overlay) * v1.8.9.0 (2020-10-04) Add Hannoversche Allgemeine Zeitung diff --git a/contentScript.js b/contentScript.js index 168b24a..e1d9433 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3,7 +3,7 @@ var ext_api = (typeof browser === 'object') ? browser : chrome; var domain; // clean local storage of sites (with an exemption for hold-list) -var arr_localstorage_hold = ['elmundo.es', 'nknews.org', 'nrz.de', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'waz.de', 'wp.de', 'wr.de']; +var arr_localstorage_hold = ['elmundo.es', 'nknews.org', 'nrz.de', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk', 'waz.de', 'wp.de', 'wr.de']; if (!matchDomain(arr_localstorage_hold)){ window.localStorage.clear(); } @@ -233,13 +233,20 @@ else if (matchDomain("firstthings.com")) { else if (matchDomain("bloomberg.com")) { document.addEventListener('DOMContentLoaded', () => { - const fence = document.querySelector('.fence-body'); - if (fence){ + let fence = document.querySelector('.fence-body'); + if (fence) { fence.classList.remove('fence-body'); } }); - const banner = document.getElementById('paywall-banner'); - removeDOMElement(banner); + let body_overlay = document.querySelector('body[data-paywall-overlay-status="show"]'); + if (body_overlay) + body_overlay.removeAttribute('data-paywall-overlay-status'); + let noscroll = document.querySelector('body[class*="noScroll"]'); + if (noscroll) + removeClassesByPrefix(noscroll, 'noScroll'); + let paywall_overlay = document.querySelector('div#graphics-paywall-overlay'); + let banner = document.getElementById('paywall-banner'); + removeDOMElement(banner, paywall_overlay); } else if (matchDomain("bloombergquint.com")) { diff --git a/lp/manifest.json b/lp/manifest.json index 76dde72..f16f1c6 100644 --- a/lp/manifest.json +++ b/lp/manifest.json @@ -318,5 +318,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.9.0" + "version": "1.8.9.1" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 28d6fa0..ec8fa9f 100644 --- a/manifest.json +++ b/manifest.json @@ -40,5 +40,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.9.0" + "version": "1.8.9.1" } \ No newline at end of file