Fix Australia News Corp (amp-redirect)
parent
71312145e5
commit
67c0ec7dcc
|
@ -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) &&
|
||||
|
|
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Chrome
|
|||
|
||||
Post-release
|
||||
Fix block inline script (Firefox-synch)
|
||||
Fix Australia News Corp (amp-redirect)
|
||||
|
||||
* v2.5.3.0 (2022-01-23)
|
||||
Add Huffingtonpost.it
|
||||
|
|
|
@ -39,5 +39,5 @@
|
|||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
],
|
||||
"version": "2.5.3.1"
|
||||
"version": "2.5.3.2"
|
||||
}
|
||||
|
|
|
@ -591,5 +591,5 @@
|
|||
"*://*.wsj.net/*",
|
||||
"*://*.zephr.com/*"
|
||||
],
|
||||
"version": "2.5.3.1"
|
||||
"version": "2.5.3.2"
|
||||
}
|
||||
|
|
12
sites.js
12
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"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue