From 6bf9f6286019dca896aec6861326a8d4efce9e1d Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 12 May 2019 22:27:15 -0700 Subject: [PATCH] Add americanbanker.com, update version --- README.md | 10 ++++++++-- background.js | 1 + contentScript.js | 9 +++++++++ manifest.json | 2 +- options.js | 1 + updates.xml | 2 +- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f16c4bb..c884923 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Notes: ### Bypass the following sites' paywalls with this extension: +American Banker (americanbanker.com)\ Baltimore Sun (baltimoresun.com)\ Barron's (barrons.com)\ Bloomberg (bloomberg.com)\ @@ -92,8 +93,13 @@ Usually premium articles cannot be bypassed as they are behind a hard paywall. ### Troubleshooting * This extension works best alongside [uBlock Origin](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm). -* On some sites if you open an article and the paywall comes up try refreshing the page. -* For The Denver Post turn off uBlock. +* If a site doesn't work try turning off uBlock and refreshing. + +### Pull Requesets +* PRs are welcome. + +### Show your support +* I am not asking for donations or anything like that, all I ask is that you star this repo. ### License Bypass Paywalls is [MIT-licensed](https://github.com/iamadamdev/bypass-paywalls-chrome/blob/master/LICENSE). diff --git a/background.js b/background.js index 5d16a6a..74066ca 100644 --- a/background.js +++ b/background.js @@ -1,6 +1,7 @@ 'use strict'; var defaultSites = { + 'American Banker': 'americanbanker.com', 'Baltimore Sun': 'baltimoresun.com', 'Barron\'s': 'barrons.com', 'Bloomberg': 'bloomberg.com', diff --git a/contentScript.js b/contentScript.js index 293a643..ddce20c 100644 --- a/contentScript.js +++ b/contentScript.js @@ -16,3 +16,12 @@ if (location.hostname.endsWith('rep.repubblica.it')) { } } } + +if (window.location.href.indexOf("americanbanker.com") !== -1) { + const paywall = document.getElementsByClassName( + "embargo-content" + ); + if (paywall && paywall.length>0 ) { + paywall[0].className = ""; + } +} \ No newline at end of file diff --git a/manifest.json b/manifest.json index 27c22f3..52f4908 100644 --- a/manifest.json +++ b/manifest.json @@ -20,5 +20,5 @@ "page": "options.html" }, "permissions": [ "cookies", "", "storage", "webRequest", "webRequestBlocking"], - "version": "1.4.9" + "version": "1.5.0" } diff --git a/options.js b/options.js index a39b249..ae311e4 100644 --- a/options.js +++ b/options.js @@ -1,4 +1,5 @@ var defaultSites = { + 'American Banker': 'americanbanker.com', 'Baltimore Sun': 'baltimoresun.com', 'Barron\'s': 'barrons.com', 'Bloomberg': 'bloomberg.com', diff --git a/updates.xml b/updates.xml index f538ca5..f63dcbc 100644 --- a/updates.xml +++ b/updates.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file