diff --git a/background.js b/background.js index 5b3292f..1e0f4f5 100644 --- a/background.js +++ b/background.js @@ -959,6 +959,18 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) { ["blocking"] ); +// theaustralian.com redirect subscribe to amp +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details)) { + return; + } + var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]).replace('www.', 'amp.'); + return { redirectUrl: updatedUrl }; +}, +{urls:["*://www.theaustralian.com.au/subscribe/*"], types:["main_frame"]}, +["blocking"] +); + // fix nytimes x-frame-options (hidden iframe content) ext_api.webRequest.onHeadersReceived.addListener(function (details) { if (!isSiteEnabled(details)) { @@ -1206,6 +1218,7 @@ 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('wsj.com', details.url) && enabledSites.includes('#options_disable_gb_wsj')); if (matchUrlDomain(change_headers, details.url) && (!['font', 'image', 'stylesheet'].includes(details.type) || matchUrlDomain(['thetimes.co.uk'], details.url))) { diff --git a/changelog.txt b/changelog.txt index 096fa1c..cec2388 100644 --- a/changelog.txt +++ b/changelog.txt @@ -8,6 +8,7 @@ Add Tampa Bay Times (local USA) Fix Challenges.fr (blur) Fix LesEchos.fr (json) Fix Repubblica.it & LaStampa.it (videos on Firefox) +Fix The Australian (option to disable Googlebot; http error 403) Fix WSJ & Barron's (amp) * v2.3.6.0 (2021-09-05) diff --git a/manifest.json b/manifest.json index 75673af..bdb285f 100644 --- a/manifest.json +++ b/manifest.json @@ -559,5 +559,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.3.6.4" + "version": "2.3.6.5" } \ No newline at end of file diff --git a/sites.js b/sites.js index ce12194..7ca27dd 100644 --- a/sites.js +++ b/sites.js @@ -317,6 +317,7 @@ var defaultSites = "Show options on update": "#options_on_update", "Restore opt-in for custom sites (on reload; Chrome-only)": "#options_restore_custom", "Barron's - no Googlebot (http error 500)": "#options_disable_gb_barrons", + "The Australian - no Googlebot (http error 403)": "#options_disable_gb_theaustralian", "The Wall Street Journal - no Googlebot (http error 500)": "#options_disable_gb_wsj" }