From ea7b3bc7fbd023b8a10d081d324afad8058a7fbc Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 27 Aug 2022 10:11:03 +0200 Subject: [PATCH] Add The Chronicle of Philanthropy --- README.md | 6 ++++-- background.js | 2 +- changelog.txt | 1 + contentScript.js | 2 +- custom/manifest.json | 2 +- manifest.json | 3 ++- sites.js | 14 +++++++++----- sites_updated.json | 13 +++++++++++++ 8 files changed, 32 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 857a24f..d42eca6 100755 --- a/README.md +++ b/README.md @@ -141,7 +141,6 @@ Grouped in options:\ ##### Tech/Science [Chemical & Engineering News](https://cen.acs.org) - -[Chronicle of Higher Education](https://www.chronicle.com) - [Dark Reading](https://www.darkreading.com) - [Discover Magazine](https://www.discovermagazine.com) - [MIT Technology Review](https://www.technologyreview.com) - @@ -157,7 +156,10 @@ Grouped in options:\ *GenomeWeb* sites like\ [360Dx](https://www.360dx.com) - [GenomeWeb](https://www.genomeweb.com) - -[Precision Oncology News](https://www.precisiononcologynews.com) +[Precision Oncology News](https://www.precisiononcologynews.com)\ +*The Chronicle* sites like\ +[The Chronicle of Higher Education](https://www.chronicle.com) - +[The Chronicle of Philanthropy](https://www.philanthropy.com) ##### Encyclopedia/Book library/Knowledge base [BBC History Extra](https://www.historyextra.com) - diff --git a/background.js b/background.js index 2c819dc..3b224d1 100755 --- a/background.js +++ b/background.js @@ -358,7 +358,7 @@ ext_api.storage.local.get({ } else { ext_api.management.getSelf(function (result) { if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) { - let new_groups = ['###_de_westfalen_medien', '###_es_grupo_vocento', '###_es_unidad', '###_it_gedi', '###_nl_dpg_media', '###_usa_genomeweb']; + let new_groups = ['###_de_westfalen_medien', '###_es_grupo_vocento', '###_es_unidad', '###_it_gedi', '###_nl_dpg_media', '###_usa_chronicle', '###_usa_genomeweb']; let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))) || (!enabledSites.includes('uol.com.br') && (enabledSites.includes('crusoe.uol.com.br') || enabledSites.includes('###_br_folha'))); if (open_options) ext_api.runtime.openOptionsPage(); diff --git a/changelog.txt b/changelog.txt index ff4e6ce..1184414 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release Add New Scientist +Add The Chronicle of Philanthropy Fix Los Angeles Times & San Diego Union-Tribune Fix Madsack Mediengruppe Fix NYTimes (Cooking) diff --git a/contentScript.js b/contentScript.js index ea27b5c..669e356 100755 --- a/contentScript.js +++ b/contentScript.js @@ -2656,7 +2656,7 @@ else if (matchDomain('cen.acs.org')) { removeDOMElement(meteredBar); } -else if (matchDomain('chronicle.com')) { +else if (matchDomain(['chronicle.com', 'philanthropy.com'])) { let preview = document.querySelector('div[data-content-summary]'); removeDOMElement(preview); let article_hidden = document.querySelector('div[data-content-body]'); diff --git a/custom/manifest.json b/custom/manifest.json index e5895d4..99b036f 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -43,5 +43,5 @@ "webRequestBlocking", "" ], - "version": "2.8.1.5" + "version": "2.8.1.6" } diff --git a/manifest.json b/manifest.json index 84d1cff..0c09565 100755 --- a/manifest.json +++ b/manifest.json @@ -457,6 +457,7 @@ "*://*.pelotonmagazine.com/*", "*://*.pennlive.com/*", "*://*.petitbleu.fr/*", + "*://*.philanthropy.com/*", "*://*.philosophynow.org/*", "*://*.pilotonline.com/*", "*://*.piqd.de/*", @@ -686,5 +687,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.8.1.5" + "version": "2.8.1.6" } diff --git a/sites.js b/sites.js index 5331919..62a7175 100755 --- a/sites.js +++ b/sites.js @@ -240,11 +240,6 @@ var defaultSites = { "Chemical & Engineering News": { domain: "cen.acs.org" }, - "Chronicle of Higher Education": { - domain: "chronicle.com", - allow_cookies: 1, - block_regex: /(\.blueconic\.net\/|\.chronicle\.com\/(common\/)?(che-auth0-user|script)\.js)/ - }, "Cicero.de": { domain: "cicero.de", allow_cookies: 1 @@ -1649,6 +1644,15 @@ var defaultSites = { domain: "csmonitor.com", allow_cookies: 1 }, + "The Chronicle of Higher Education (& Philanthropy)": { + domain: "###_usa_chronicle", + group: [ + "chronicle.com", + "philanthropy.com" + ], + allow_cookies: 1, + block_regex: /\.blueconic\.net\// + }, "The Daily Beast": { domain: "thedailybeast.com", block_regex: /\.tinypass\.com\// diff --git a/sites_updated.json b/sites_updated.json index 2fadcc2..e04b901 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -5,6 +5,19 @@ "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js", "amp_redirect": "p.read-txt" }, + "Chronicle of Philanthropy": { + "domain": "philanthropy.com", + "allow_cookies": 1, + "block_regex": "\\.blueconic\\.net\\/", + "cs_code": [{ + "cond": "div[data-content-summary]", + "rm_elem": 1 + }, { + "cond": "div[data-content-body]", + "rm_attrib": "data-content-body" + } + ] + }, "La Vie": { "domain": "lavie.fr", "allow_cookies": 1,