mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 06:17:46 +01:00
Fix The Australian (option to disable Googlebot; http error 403)
This commit is contained in:
parent
69064c0ad0
commit
8cf63fbf14
4 changed files with 16 additions and 1 deletions
|
@ -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))) {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -559,5 +559,5 @@
|
|||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.3.6.4"
|
||||
"version": "2.3.6.5"
|
||||
}
|
1
sites.js
1
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"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue