Fix Australia News Corp (amp-redirect)

merge-requests/3/head
magnolia1234 2 years ago
parent ab8e66fbb5
commit 5d25d1f097

@ -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) &&

@ -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

@ -603,5 +603,5 @@
"*://*.wsj.net/*",
"*://*.zephr.com/*"
],
"version": "2.5.3.1"
"version": "2.5.3.2"
}

@ -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"
}

Loading…
Cancel
Save