From d66bc0bbc4946f14a9dda15de3c65241bff1513d Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 7 Jul 2018 15:11:09 -0700 Subject: [PATCH] Add businessinsider.com --- background.js | 1 + changelog.txt | 1 + contentScript.js | 9 ++++++++- manifest.json | 4 ++-- options.js | 1 + popup.html | 2 +- 6 files changed, 14 insertions(+), 4 deletions(-) diff --git a/background.js b/background.js index e9a761f..fc22fad 100644 --- a/background.js +++ b/background.js @@ -5,6 +5,7 @@ var defaultSites = { 'Baltimore Sun': 'baltimoresun.com', 'Barron\'s': 'barrons.com', 'Bloomberg': 'bloomberg.com', + 'Business Insider': 'businessinsider.com', 'Crain\'s Chicago Business': 'chicagobusiness.com', 'Chicago Tribune': 'chicagotribune.com', 'Corriere Della Sera': 'corriere.it', diff --git a/changelog.txt b/changelog.txt index 3efd748..6ae1b94 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,6 @@ Updates-- +2018-07-07 v1.3.1: Added Business Insider (businessinsider.com) 2018-07-04 v1.3.0: Added The Denver Post (denverpost.com, note: need to turn off uBlock for this site), added Hacked (hacked.com) 2018-06-20 v1.2.10: Added The Business Journals (bizjournals.com) 2018-06-27 v1.2.9: Fixed The Washington Post (washingtonpost.com) diff --git a/contentScript.js b/contentScript.js index ab61b9a..4f334fc 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1,4 +1,4 @@ -if (window.location.href.indexOf("bizjournals.com") > -1) { +if (window.location.href.indexOf("bizjournals.com") !== -1) { const hiddenStory = document.getElementsByClassName( "js-pre-chunks__story-body" ); @@ -12,4 +12,11 @@ if (window.location.href.indexOf("bizjournals.com") > -1) { if (payWallMessage && payWallMessage.length>0 ) { payWallMessage[0].style.display = "none"; } +} else if (window.location.href.indexOf("businessinsider.com") !== -1) { + const paywall = document.getElementsByClassName( + "tp-modal" + ); + while (paywall.length > 0) { + paywall[0].parentNode.removeChild(paywall[0]); + } } diff --git a/manifest.json b/manifest.json index ab3f4ac..cb62b25 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ }, "content_scripts": [ { - "matches": ["*://*.bizjournals.com/*"], + "matches": ["*://*.bizjournals.com/*", "*://*.businessinsider.com/*"], "js": ["contentScript.js"] } ], @@ -43,5 +43,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.3.0" + "version": "1.3.1" } diff --git a/options.js b/options.js index ca12b09..5ff1e99 100644 --- a/options.js +++ b/options.js @@ -3,6 +3,7 @@ var defaultSites = { 'Baltimore Sun': 'baltimoresun.com', 'Barron\'s': 'barrons.com', 'Bloomberg': 'bloomberg.com', + 'Business Insider': 'businessinsider.com', 'Crain\'s Chicago Business': 'chicagobusiness.com', 'Chicago Tribune': 'chicagotribune.com', 'Corriere Della Sera': 'corriere.it', diff --git a/popup.html b/popup.html index d457530..44d993f 100644 --- a/popup.html +++ b/popup.html @@ -1,7 +1,7 @@ -
Bypass Paywalls v1.3.0 by Adam +
Bypass Paywalls v1.3.1 by Adam Options