From 63463371f7b315fcbf6ada50d64d4006848532ad Mon Sep 17 00:00:00 2001 From: Tomas Cimermonas Date: Sun, 6 Oct 2019 20:28:18 +0300 Subject: [PATCH] Remove paywall from DOM --- contentScript.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contentScript.js b/contentScript.js index 154c7035..f8f821ad 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(); + } +}