From 9da652fee604963bd7aed3c2944ce6a77e4da4c5 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 22 May 2022 19:59:59 +0200 Subject: [PATCH] Add group ARA.cat --- README.md | 3 +++ changelog.txt | 1 + contentScript.js | 12 ++++++++++++ manifest.json | 4 +++- sites.js | 12 +++++++++++- sites_updated.json | 10 ++++++++++ 6 files changed, 40 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e211f9..9232935 100644 --- a/README.md +++ b/README.md @@ -594,6 +594,9 @@ Grouped in options:\ [Política Exterior](https://www.politicaexterior.com) Grouped in options:\ +*ARA* sites like:\ +[Ara.cat](https://www.ara.cat) - +[Ara Balears](https://www.arabalears.cat)\ *Grupo Prensa Ibérica* sites like (opt-in to custom sites for unlisted):\ [Diario de Mallorca](https://www.diariodemallorca.es) - [El Día](https://www.eldia.es) - diff --git a/changelog.txt b/changelog.txt index 4466bdd..6f3864e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Add group ARA.cat Add LaVie.fr Add Mallorca Zeitung Add The Lawyer's Daily (Canada) diff --git a/contentScript.js b/contentScript.js index 4f34aac..42b6d6f 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1023,6 +1023,18 @@ if (matchDomain('abc.es')) { } } +else if (matchDomain(['ara.cat', 'arabalears.cat'])) { + let url = window.location.href; + if (!window.location.pathname.endsWith('.amp.html')) { + let paywall = document.querySelector('div.paywall'); + let amphtml = document.querySelector('link[rel="amphtml"]'); + if (paywall && amphtml) { + removeDOMElement(paywall); + window.location.href = amphtml.href; + } + } +} + else if (matchDomain('cmjornal.pt')) { let paywall = document.querySelector('.bloqueio_exclusivos'); let amphtml = document.querySelector('link[rel="amphtml"]'); diff --git a/manifest.json b/manifest.json index 637f5ef..21f7ea2 100644 --- a/manifest.json +++ b/manifest.json @@ -74,6 +74,8 @@ "*://*.americanaffairsjournal.org/*", "*://*.americanbanker.com/*", "*://*.apollo-magazine.com/*", + "*://*.ara.cat/*", + "*://*.arabalears.cat/*", "*://*.artnet.com/*", "*://*.arvopaperi.fi/*", "*://*.asiatimes.com/*", @@ -676,5 +678,5 @@ "*://*.wsj.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.6.9.7" + "version": "2.6.9.8" } diff --git a/sites.js b/sites.js index 4e6bf22..135fcd7 100644 --- a/sites.js +++ b/sites.js @@ -78,6 +78,16 @@ var defaultSites = { allow_cookies: 1, block_regex: /\.tinypass\.com\// }, + "ARA": { + domain: "###_cat_ara", + group: [ + "ara.cat", + "arabalears.cat" + ], + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, + useragent: "googlebot" + }, "Artnet": { domain: "artnet.com", allow_cookies: 1, @@ -1852,7 +1862,7 @@ var defaultSites = { "sun-sentinel.com" ], allow_cookies: 1, - block_regex: /(\.tribdss\.com\/|js\.matheranalytics\.com\/|\.zephr\.com\/zephr-browser\/.+\/zephr-browser\.umd\.js)/ + block_regex: /(\.tribdss\.com\/|\.blueconic\.net\/|\.zephr\.com\/zephr-browser\/.+\/zephr-browser\.umd\.js)/ }, "Trouw": { domain: "trouw.nl", diff --git a/sites_updated.json b/sites_updated.json index 3ef85d5..1bdfaff 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -1,4 +1,14 @@ { + "ARA": { + "domain": "###_cat_ara", + "group": [ + "ara.cat", + "arabalears.cat" + ], + "allow_cookies": 1, + "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js", + "useragent": "googlebot" + }, "La Vie": { "domain": "lavie.fr", "allow_cookies": 1,