diff --git a/README.md b/README.md index 23d3325..e219ae3 100755 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Due to [Google internal policy](https://developer.chrome.com/webstore/program_po The following instructions are needed to install third-party extensions in [Chromium](https://en.wikipedia.org/wiki/Chromium_(web_browser))-based desktop browsers. In extension developer mode you can always install BPC by `Load unpacked` (latest master, but no automatic updates) or by crx-file (latest release & automatic updates, but possibly you have to add the extension to the allowlist). -#### Load unpacked: Chrome (desktop), Microsoft Edge (Chromium)/Brave/Yandex +#### Load unpacked: Chrome, Microsoft Edge or Brave (all desktop)) * or add extension to allowlist and install automatically updating crx-file (see next section) 1. Download this repository as a [ZIP-file from GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean/-/archive/master/bypass-paywalls-chrome-clean-master.zip). @@ -37,8 +37,8 @@ In extension developer mode you can always install BPC by `Load unpacked` (lates If you're familiar with Git(Hub)-clients you can also clone this repo and update the extension that way (load unpacked folder used by Git(Hub)-client). -#### CRX-file: other Chromium browsers (Opera/Vivaldi) -* or add extension to allowlist for Chrome, MS Edge, Brave or Yandex (see [instructions](https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean/-/tree/master/allowlist/README.md)) +#### CRX-file: other Chromium browsers (Opera/Vivaldi/Yandex) +* or add extension to allowlist for Chrome, MS Edge or Brave (see [instructions](https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean/-/tree/master/allowlist/README.md)) 1. Download the extension as a crx-file from the [releases page](https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean/-/releases). 2. In your browser go to the extensions page. @@ -579,6 +579,7 @@ Grouped in options:\ [Asia Times](https://asiatimes.com) - [Caixin Global](https://www.caixinglobal.com) - [CommonWealth Magazine Taiwan](https://www.cw.com.tw) - +[Harvard Business Review China](https://www.hbrchina.org) - [Harvard Business Review Taiwan](https://www.hbrtaiwan.com) - [Nikkei Asian Review](https://asia.nikkei.com) - [NK News](https://www.nknews.org)* - diff --git a/allowlist/Yandex-windows-allowlist.reg b/allowlist/Yandex-windows-allowlist.reg deleted file mode 100644 index 4c0e75e..0000000 --- a/allowlist/Yandex-windows-allowlist.reg +++ /dev/null @@ -1,3 +0,0 @@ -Windows Registry Editor Version 5.00 -[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\YandexBrowser\ExtensionInstallAllowlist] -"1"="lkbebcjgcmobigpeffafkodonchffocl" \ No newline at end of file diff --git a/background.js b/background.js index 867fa90..07bfe28 100755 --- a/background.js +++ b/background.js @@ -258,10 +258,10 @@ ext_api.storage.local.get({ optin_setcookie = items.optIn; excludedSites = items.sites_excluded; - enabledSites = Object.keys(sites).filter(function (key) { - return (sites[key] !== '' && sites[key] !== '###'); - }).map(function (key) { - return sites[key].toLowerCase(); + enabledSites = Object.values(sites).filter(function (val) { + return (val !== '' && val !== '###'); + }).map(function (val) { + return val.toLowerCase(); }); // Enable new sites by default (opt-in) @@ -298,10 +298,10 @@ ext_api.storage.onChanged.addListener(function (changes, namespace) { if (key === 'sites') { var sites = storageChange.newValue; optionSites = sites; - enabledSites = Object.keys(sites).filter(function (key) { - return (sites[key] !== '' && sites[key] !== '###'); - }).map(function (key) { - return sites[key]; + enabledSites = Object.values(sites).filter(function (val) { + return (val !== '' && val !== '###'); + }).map(function (val) { + return val.toLowerCase(); }); disabledSites = defaultSites_domains.concat(customSites_domains).filter(x => !enabledSites.includes(x) && x !== '###'); add_grouped_enabled_domains(grouped_sites); diff --git a/changelog.txt b/changelog.txt index 5d05019..89c7021 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,12 +2,14 @@ Changelog Bypass Paywalls Clean - Chrome Post-release +Add Harvard Business Review China Add Mitteldeutsche Zeitung Fix ElMundo.es (amp) Fix Lee Enterprises Group Fix LesEchos.fr (json) Fix WaPo (images) Fix WSJ (timing) +Add allowlist for BPC extension (macOS) Refactor (custom) site rules * v2.4.2.0 (2021-10-31) @@ -602,7 +604,7 @@ Fix El Pais (Spain) Fix The Globe and Mail (FF for Android v68) Fix The Hindu (menu) Fix WSJ -Add whitelist for BPC extension +Add allowlist for BPC extension (Windows) Fix custom sites Googlebot-fix (after reload) * v1.8.8.0 (2020-09-27) diff --git a/contentScript.js b/contentScript.js index 43981df..9c21775 100755 --- a/contentScript.js +++ b/contentScript.js @@ -2028,6 +2028,12 @@ else if (matchDomain('hbr.org')) { removeDOMElement(popup); } +else if (matchDomain('hbrchina.org')) { + let div_hidden = document.querySelector('div#the_content'); + if (div_hidden) + div_hidden.removeAttribute('style'); +} + else if (matchDomain('hindustantimes.com')) { let paywall = document.querySelector('.freemium-card'); if (paywall) { diff --git a/custom/manifest.json b/custom/manifest.json index 51a8c7b..aa4a18c 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -39,5 +39,5 @@ "webRequestBlocking", "" ], - "version": "2.4.2.5" + "version": "2.4.2.6" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 23f2ab9..f37c0ec 100755 --- a/manifest.json +++ b/manifest.json @@ -203,6 +203,7 @@ "*://*.harpers.org/*", "*://*.haz.de/*", "*://*.hbr.org/*", + "*://*.hbrchina.org/*", "*://*.hbrtaiwan.com/*", "*://*.heraldsun.com.au/*", "*://*.hilltimes.com/*", @@ -546,5 +547,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.4.2.5" + "version": "2.4.2.6" } \ No newline at end of file diff --git a/sites.js b/sites.js index e2e61db..07c72b3 100755 --- a/sites.js +++ b/sites.js @@ -620,6 +620,10 @@ var defaultSites = { domain: "hbr.org", block_regex: /\.tinypass\.com\// }, + "Harvard Business Review China": { + domain: "hbrchina.org", + allow_cookies: 1 + }, "Harvard Business Review Taiwan": { domain: "hbrtaiwan.com" },