From fbc8b4545695cc85593e6075526ccf0c6c973f84 Mon Sep 17 00:00:00 2001 From: Richard Wright Date: Sat, 30 Jun 2018 15:48:40 -0400 Subject: [PATCH] adding support for business chronicles --- README.md | 2 ++ background.js | 3 ++- changelog.txt | 1 + contentScript.js | 14 +++++++++++++- manifest.json | 37 ++++++++++++++++++++++++++----------- options.js | 1 + popup.html | 2 +- 7 files changed, 46 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c8c4c548..fef79bfc 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ OrlandoSentinel (orlandosentinel.com)\ Quora (quora.com)\ SunSentinel (sun-sentinel.com)\ TheMarker (themarker.com)\ +The Business Journals (bizjournals.com)\ The Seattle Times (seattletimes.com)\ The Sydney Morning Herald (smh.com.au)\ The Washington Post (washingtonpost.com)\ @@ -47,4 +48,5 @@ Vanity Fair (vanityfair.com)\ Wired (wired.com) ### Troubleshooting + If WSJ stops working try removing all wsj.com site cookies. diff --git a/background.js b/background.js index 4faf6552..ef123090 100644 --- a/background.js +++ b/background.js @@ -27,6 +27,7 @@ var defaultSites = { 'Nikkei Asian Review': 'asia.nikkei.com', 'NRC': 'nrc.nl', 'The Boston Globe': 'bostonglobe.com', + 'The Business Journals': 'bizjournals.com', 'The Globe and Mail': 'theglobeandmail.com', 'The Mercury News': 'mercurynews.com', 'The Morning Call': 'mcall.com', @@ -231,4 +232,4 @@ browser.webRequest.onCompleted.addListener(function(details) { } }, { urls: [""] -}); +}); \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index edf2e8b6..44a7a252 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,6 @@ Updates-- +2018-06-20 v1.2.10: Added The Business Journals (bizjournals.com) 2018-06-27 v1.2.9: Fixed The Washington Post (washingtonpost.com) 2018-06-22 v1.2.8: Added Vanity Fair (vanityfair.com), added The Globe and Mail (theglobeandmail.com) 2018-06-03 v1.2.7: Added Wired (wired.com) diff --git a/contentScript.js b/contentScript.js index 395646e4..a1355b6b 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1 +1,13 @@ -window.localStorage.clear(); +if (window.location.href.indexOf("bizjournals.com") > -1) { + const hiddenStory = document.getElementsByClassName( + "js-pre-chunks__story-body" + ); + if (hiddenStory) { + hiddenStory[0].style.display = "block"; + } + + const payWallMessage = document.getElementsByClassName("chunk chunk--flex@lg chunk--paywall"); + if (hiddenStory) { + payWallMessage[0].style.display = "none"; + } +} diff --git a/manifest.json b/manifest.json index 030b02a2..c68ea716 100644 --- a/manifest.json +++ b/manifest.json @@ -2,20 +2,29 @@ "background": { "scripts": ["background.js"] }, + "content_scripts": [ + { + "matches": ["*://*.bizjournals.com/*"], + "js": ["contentScript.js"] + } + ], "applications": { - "gecko": { - "id": "iamadamdev@hotmail.com" - } + "gecko": { + "id": "iamadamdev@hotmail.com" + } }, "browser_action": { "default_popup": "popup.html", "default_icon": { - "128": "bypass.png" - }, - "theme_icons": [{ - "light": "bypass-dark.png", - "dark": "bypass.png", - "size": 128 }] + "128": "bypass.png" + }, + "theme_icons": [ + { + "light": "bypass-dark.png", + "dark": "bypass.png", + "size": 128 + } + ] }, "description": "Bypass News Sites' Paywalls", "icons": { @@ -27,6 +36,12 @@ "options_ui": { "page": "options.html" }, - "permissions": [ "cookies", "", "storage", "webRequest", "webRequestBlocking"], - "version": "1.2.9" + "permissions": [ + "cookies", + "", + "storage", + "webRequest", + "webRequestBlocking" + ], + "version": "1.2.10" } diff --git a/options.js b/options.js index fee3b434..f0853afb 100644 --- a/options.js +++ b/options.js @@ -25,6 +25,7 @@ var defaultSites = { 'Nikkei Asian Review': 'asia.nikkei.com', 'NRC': 'nrc.nl', 'The Boston Globe': 'bostonglobe.com', + 'The Business Journals': 'bizjournals.com', 'The Globe and Mail': 'theglobeandmail.com', 'The Mercury News': 'mercurynews.com', 'The Morning Call': 'mcall.com', diff --git a/popup.html b/popup.html index eeb2b6f5..639cd3eb 100644 --- a/popup.html +++ b/popup.html @@ -1,7 +1,7 @@ -
Bypass Paywalls v1.2.9 by Adam +
Bypass Paywalls v1.2.10 by Adam Options