From 097d51659cf7ee3e88faacaa43e4d649799eb688 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 16 Oct 2020 18:41:41 +0200 Subject: [PATCH] Add Quotidiano.net (Italy) --- README.md | 3 ++- background.js | 2 ++ changelog.txt | 1 + contentScript.js | 9 +++++++++ manifest.json | 3 ++- sites.js | 1 + 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3c5b4d8c..a2d88659 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,8 @@ So don't update to Firefox 79 or use F-droid's [Fennec-release](https://f-droid. [La Repubblica](https://www.repubblica.it) - [La Stampa](https://www.lastampa.it) - [Le Scienze](https://www.lescienze.it) - -[LimesOnline (it/en)](https://www.limesonline.com) +[LimesOnline (it/en)](https://www.limesonline.com) - +[Quotidiano.net](https://www.quotidiano.net) ##### Netherlands/Flanders [Algemeen Dagblad](https://www.ad.nl) and regional ADR sites like [BN DeStem](https://www.bndestem.nl) - diff --git a/background.js b/background.js index 93b7cb6d..cd27d394 100644 --- a/background.js +++ b/background.js @@ -66,6 +66,7 @@ var allow_cookies = [ 'nytimes.com', 'nzz.ch', 'parool.nl', +'quotidiano.net', 'quora.com', 'repubblica.it', 'rollingstone.com', @@ -216,6 +217,7 @@ var blockedRegexes = { 'newyorker.com': /.+\.newyorker\.com\/verso\/static\/presenter-articles.+\.js/, 'nknews.org': /.+\.nknews\.org\/wp-content\/plugins\/leaky-paywall-ajax\/js\/leaky-paywall-ajax\.js/, 'nytimes.com': /(.+meter-svc\.nytimes\.com\/meter\.js.+|.+mwcm\.nyt\.com\/.+\.js)/, +'quotidiano.net': /.+\.tinypass\.com\/.+/, 'repubblica.it': /scripts\.repubblica\.it\/pw\/pw\.js.+/, 'rollingstone.com': /cdn\.cxense\.com/, 'sacbee.com': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/, diff --git a/changelog.txt b/changelog.txt index f4b9532e..122aeaba 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add Quotidiano.net (Italy) Add The West Australian (+ regional) Fix-update Toronto Star (external cookie-script) Update opt-in tab (default settings) diff --git a/contentScript.js b/contentScript.js index 5365d0e8..02b01fb7 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1365,6 +1365,15 @@ else if (matchDomain("slate.com")) { removeDOMElement(slate_roadblock); } +else if (matchDomain("quotidiano.net")) { + let detail_text_truncated = document.querySelector('div.detail-text--truncated'); + let detail_page_paywall = document.querySelector('body.detail-page--paywall'); + if (detail_page_paywall) { + removeDOMElement(detail_text_truncated); + detail_page_paywall.classList.remove('detail-page--paywall'); + } +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/manifest.json b/manifest.json index a7e9520d..e8f91ae0 100644 --- a/manifest.json +++ b/manifest.json @@ -208,6 +208,7 @@ "*://*.post-gazette.com/*", "*://*.qt.com.au/*", "*://*.quora.com/*", + "*://*.quotidiano.net/*", "*://*.qz.com/*", "*://*.repubblica.it/*", "*://*.republic.ru/*", @@ -325,5 +326,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.9.0.4" + "version": "1.9.0.5" } \ No newline at end of file diff --git a/sites.js b/sites.js index 6e868ee9..b1d43231 100644 --- a/sites.js +++ b/sites.js @@ -133,6 +133,7 @@ var defaultSites = "Pittsburgh Post Gazette": "post-gazette.com", "Quartz (free articles only)": "qz.com", "Quora": "quora.com", + "Quotidiano.net": "quotidiano.net", "Republic.ru": "republic.ru", "Rolling Stone": "rollingstone.com", "San Diego Union Tribune": "sandiegouniontribune.com",