From 487b8cdd9a8a6503e7a512416436758bd582e901 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 21 Oct 2020 08:18:36 +0200 Subject: [PATCH] Add The Logic (Canada) --- README.md | 1 + background.js | 25 +++++++++++++------------ changelog.txt | 1 + contentScript.js | 5 +++++ manifest.json | 3 ++- sites.js | 1 + 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2b403bc..57c050b 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ So don't update to Firefox 79 or use Firefox Nightly (and load BPC from a custom [Le Devoir](https://www.ledevoir.com) - [National Post](https://www.nationalpost.com) - [The Globe and Mail](https://www.theglobeandmail.com) - +[The Logic](https://thelogic.co) - [The Toronto Star](https://www.thestar.com) #### Europe diff --git a/background.js b/background.js index 986f975..0fc0b62 100644 --- a/background.js +++ b/background.js @@ -104,10 +104,10 @@ var remove_cookies = [ // select specific cookie(s) to hold from remove_cookies domains const remove_cookies_select_hold = { - 'barrons.com': ['wsjregion'], - 'newstatesman.com': ['STYXKEY_nsversion'], - 'qz.com': ['gdpr'], - 'wsj.com': ['wsjregion'] + 'barrons.com': ['wsjregion'], + 'newstatesman.com': ['STYXKEY_nsversion'], + 'qz.com': ['gdpr'], + 'wsj.com': ['wsjregion'] } // list of regional ad.nl sites @@ -115,16 +115,16 @@ const ad_region_domains = ['bd.nl', 'ed.nl', 'tubantia.nl', 'bndestem.nl', 'pzc. // select only specific cookie(s) to drop from remove_cookies domains var remove_cookies_select_drop = { - 'ad.nl': ['temptationTrackingId'], - 'caixinglobal.com': ['CAIXINGLB_LOGIN_UUID'], - 'dn.se': ['randomSplusId'], - 'fd.nl': ['socialread'], - 'nrc.nl': ['counter'], - 'theatlantic.com': ['articleViews'] + 'ad.nl': ['temptationTrackingId'], + 'caixinglobal.com': ['CAIXINGLB_LOGIN_UUID'], + 'dn.se': ['randomSplusId'], + 'fd.nl': ['socialread'], + 'nrc.nl': ['counter'], + 'theatlantic.com': ['articleViews'] } for (var domainIndex in ad_region_domains) { - let domain = ad_region_domains[domainIndex]; - remove_cookies_select_drop[domain] = ['temptationTrackingId']; + let domain = ad_region_domains[domainIndex]; + remove_cookies_select_drop[domain] = ['temptationTrackingId']; } // Override User-Agent with Googlebot @@ -857,6 +857,7 @@ ext_api.storage.sync.get(["optInShown", "customShown"], function (result) { function isSiteEnabled(details) { var enabledSite = matchUrlDomain(enabledSites, details.url); + if (ext_name.includes(' for ')) enabledSite = ''; if (enabledSite in restrictions) { return restrictions[enabledSite].test(details.url); } diff --git a/changelog.txt b/changelog.txt index 8249d5b..56fa227 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Il Resto del Carlino (Italy) +Add The Logic (Canada) Add The New York Review of Books Fix-update Funke Medien (TinyPass) diff --git a/contentScript.js b/contentScript.js index 5b01ca1..3cf8d40 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1378,6 +1378,11 @@ else if (matchDomain("nybooks.com")) { paywall_article.classList.remove('paywall-article'); } +else if (matchDomain("thelogic.co")) { + let article_subscribe = document.querySelector('.article-subscribe'); + removeDOMElement(article_subscribe); +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/manifest.json b/manifest.json index ae97d3c..b84b4c6 100644 --- a/manifest.json +++ b/manifest.json @@ -257,6 +257,7 @@ "*://*.thediplomat.com/*", "*://*.theglobeandmail.com/*", "*://*.thehindu.com/*", + "*://*.thelogic.co/*", "*://*.themarker.com/*", "*://*.themercury.com.au/*", "*://*.themorningbulletin.com.au/*", @@ -331,5 +332,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.9.1.3" + "version": "1.9.1.4" } \ No newline at end of file diff --git a/sites.js b/sites.js index c0848e5..e65dc70 100644 --- a/sites.js +++ b/sites.js @@ -171,6 +171,7 @@ var defaultSites = "The Hindu": "thehindu.com", "The Irish Times": "irishtimes.com", "The Japan Times": "japantimes.co.jp", + "The Logic": "thelogic.co", "The Marker": "themarker.com", "The Mercury News": "mercurynews.com", "The Morning Call": "mcall.com",