From a594d0b03a7f5722cfedbbf501d004337cd63e75 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 31 Jul 2021 14:11:20 +0200 Subject: [PATCH] Fix Australia Nine sites --- background.js | 2 +- changelog.txt | 1 + contentScript.js | 2 +- manifest.json | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/background.js b/background.js index 9934f22..f789dec 100644 --- a/background.js +++ b/background.js @@ -572,7 +572,7 @@ function add_grouped_sites(init_rules) { // rules only for (let domain of au_nine_domains) - blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/; + blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-((sticky-)?ad|subscriptions)-.+\.js/; for (let domain of es_unidad_domains) { allow_cookies.push(domain); blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent)-.+\.js/; diff --git a/changelog.txt b/changelog.txt index f2acfd8..ae0f6b0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Add Iltalehti.fi (Firefox-only) Add Marca (Spain) Grouping Quotidiano.net sites (Italy) Remove Le Un (obsolete) +Fix Australia Nine sites Fix Commentary Magazine (new domain) Fix Gestion & El Comercio (Peru) Fix Grupo Vocento (Spain) diff --git a/contentScript.js b/contentScript.js index 3ac7154..1996dcc 100644 --- a/contentScript.js +++ b/contentScript.js @@ -89,7 +89,7 @@ if (matchDomain('thesaturdaypaper.com.au')) { else if (domain = matchDomain(["brisbanetimes.com.au", "smh.com.au", "theage.com.au", "watoday.com.au"])) { let url = window.location.href; - let for_subscribers = document.querySelector('meta[content^="FOR SUBSCRIBERS"]'); + let for_subscribers = document.querySelector('meta[content^="FOR SUBSCRIBERS"], #paywall_prompt'); if (for_subscribers) { window.setTimeout(function () { window.location.href = url.replace('www.', 'amp.'); diff --git a/manifest.json b/manifest.json index 33c86ca..5f04fb1 100644 --- a/manifest.json +++ b/manifest.json @@ -540,5 +540,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.3.0.7" + "version": "2.3.0.8" } \ No newline at end of file