diff --git a/background.js b/background.js index 8003c405..06048e7a 100644 --- a/background.js +++ b/background.js @@ -569,7 +569,8 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) { ["blocking"] ); -// theaustralian.com, adelaidenow.com.au, cairnspost.com.au redirect subscribe to amp +// Australia News Corp redirect subscribe to amp +var au_news_corp_subscr = au_news_corp_domains.map(domain => '*://www.' + domain + '/subscribe/*'); ext_api.webRequest.onBeforeRequest.addListener(function (details) { if (!isSiteEnabled(details) || details.url.includes('/digitalprinteditions') || !details.url.includes('dest=')) { return; @@ -577,7 +578,7 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) { var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]).replace('www.', 'amp.'); return { redirectUrl: updatedUrl }; }, -{urls:["*://www.theaustralian.com.au/subscribe/*", "*://www.adelaidenow.com.au/subscribe/*", "*://www.cairnspost.com.au/subscribe/*"], types:["main_frame"]}, +{urls:au_news_corp_subscr, types:["main_frame"]}, ["blocking"] ); @@ -885,7 +886,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { var setReferer = false; var googlebotEnabled = matchUrlDomain(use_google_bot, details.url) && !(matchUrlDomain('barrons.com', details.url) && enabledSites.includes('#options_disable_gb_barrons')) && - !(matchUrlDomain('theaustralian.com.au', details.url) && enabledSites.includes('#options_disable_gb_theaustralian')) && !(matchUrlDomain('thetimes.co.uk', details.url) && !details.url.match(/\/epaper\.thetimes\.co\.uk\//)) && !(matchUrlDomain('wsj.com', details.url) && enabledSites.includes('#options_disable_gb_wsj')); var bingbotEnabled = matchUrlDomain(use_bing_bot, details.url) && diff --git a/changelog.txt b/changelog.txt index aede14d5..3a11143e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix Australia News Corp (amp-redirect) * v2.5.3.1 (2022-01-23) Hotfix block inline script diff --git a/manifest.json b/manifest.json index 89f4f716..f9a4cffc 100644 --- a/manifest.json +++ b/manifest.json @@ -603,5 +603,5 @@ "*://*.wsj.net/*", "*://*.zephr.com/*" ], - "version": "2.5.3.1" + "version": "2.5.3.2" } diff --git a/sites.js b/sites.js index 47f70de8..54bd7247 100644 --- a/sites.js +++ b/sites.js @@ -127,14 +127,7 @@ var defaultSites = { "weeklytimesnow.com.au" ], allow_cookies: 1, - useragent: "googlebot", - block_regex: /(\.com\.au\/remote\/identity\/rampart\/latest\/rampart\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/, - exception: [{ - domain: ["adelaidenow.com.au", "cairnspost.com.au"], - allow_cookies: 1, - block_regex: /(\.com\.au\/remote\/identity\/rampart\/latest\/rampart\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/ - } - ] + block_regex: /(\.com\.au\/remote\/identity\/rampart\/latest\/rampart\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js)/ }, "Australian Community Media (daily)": { domain: "###_au_comm_media", @@ -1864,9 +1857,6 @@ var defaultSites = { "Barron's - no Googlebot (http error 500)": { domain: "#options_disable_gb_barrons" }, - "The Australian - no Googlebot (http error 403)": { - domain: "#options_disable_gb_theaustralian" - }, "The Wall Street Journal - no Googlebot (http error 500)": { domain: "#options_disable_gb_wsj" }