From 34d8a2bb6071a408ae2ae6ea5ab077e330b40443 Mon Sep 17 00:00:00 2001 From: Tomas Cimermonas Date: Sun, 6 Oct 2019 20:28:18 +0300 Subject: [PATCH 1/2] Remove paywall from DOM --- contentScript.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contentScript.js b/contentScript.js index 154c703..f8f821a 100644 --- a/contentScript.js +++ b/contentScript.js @@ -89,3 +89,15 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) { }, 300); // Delay (in milliseconds) } } + +if (window.location.href.indexOf("bloombergquint.com") !== -1) { + const articlesLeftModal = document.getElementsByClassName('paywall-meter-module__story-paywall-container__1UgCE')[0]; + const paywall = document.getElementById('paywallDmp'); + removeDOMElement(articlesLeftModal, paywall); +} + +function removeDOMElement(...elements) { + for (let element of elements) { + if (element) element.remove(); + } +} From 6af0f1ab0b6535e0764f5c195363ac316bb2e304 Mon Sep 17 00:00:00 2001 From: Tomas Cimermonas Date: Sun, 6 Oct 2019 20:28:35 +0300 Subject: [PATCH 2/2] Add to options & update readme --- README.md | 1 + background.js | 2 ++ options.js | 1 + 3 files changed, 4 insertions(+) diff --git a/README.md b/README.md index da6ef1d..5eddf2f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [Baltimore Sun](https://www.baltimoresun.com)\ [Barron's](https://www.barrons.com)\ [Bloomberg](https://www.bloomberg.com)\ +[Bloomberg Quint]('https://www.bloombergquint.com)\ [Business Insider](https://www.businessinsider.com)\ [Caixin](https://www.caixinglobal.com)\ [Chemical & Engineering News](https://cen.acs.org)\ diff --git a/background.js b/background.js index 89e4f3a..1e90784 100644 --- a/background.js +++ b/background.js @@ -4,6 +4,7 @@ var defaultSites = { 'Baltimore Sun': 'baltimoresun.com', 'Barron\'s': 'barrons.com', 'Bloomberg': 'bloomberg.com', + 'Bloomberg Quint': 'bloombergquint.com', 'Business Insider': 'businessinsider.com', 'Caixin': 'caixinglobal.com', 'Chemical & Engineering News': 'cen.acs.org', @@ -147,6 +148,7 @@ const remove_cookies = [ 'theatlantic.com', 'chicagobusiness.com', 'qz.com', +'bloombergquint.com' ] // Override User-Agent with Googlebot diff --git a/options.js b/options.js index 694161e..699526c 100644 --- a/options.js +++ b/options.js @@ -2,6 +2,7 @@ var defaultSites = { 'Baltimore Sun': 'baltimoresun.com', 'Barron\'s': 'barrons.com', 'Bloomberg': 'bloomberg.com', + 'Bloomberg Quint': 'bloombergquint.com', 'Business Insider': 'businessinsider.com', 'Caixin': 'caixinglobal.com', 'Chemical & Engineering News': 'cen.acs.org',