Add Harvard Business Review China

This commit is contained in:
magnolia1234 2021-11-06 09:24:44 +01:00
parent 0242681813
commit 163c6f8337
6 changed files with 22 additions and 9 deletions

View file

@ -556,6 +556,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)* -

View file

@ -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);

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Add Harvard Business Review China
Add Mitteldeutsche Zeitung
Fix ElMundo.es (amp)
Fix Lee Enterprises Group

View file

@ -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) {

View file

@ -215,6 +215,7 @@
"*://*.harpers.org/*",
"*://*.haz.de/*",
"*://*.hbr.org/*",
"*://*.hbrchina.org/*",
"*://*.hbrtaiwan.com/*",
"*://*.heraldsun.com.au/*",
"*://*.hilltimes.com/*",
@ -558,5 +559,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.4.2.5"
"version": "2.4.2.6"
}

View file

@ -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"
},