Fix The Chronicle (amp-redirect)

This commit is contained in:
magnolia1234 2022-01-28 14:53:45 +01:00
parent b67dd23bfc
commit 7c5e8dc0d2
2 changed files with 13 additions and 5 deletions

View File

@ -575,12 +575,19 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) {
if (!isSiteEnabled(details) || details.url.includes('/digitalprinteditions') || !details.url.includes('dest=')) {
return;
}
var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]).replace('www.', 'amp.');
return { redirectUrl: updatedUrl };
var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]);
if (matchUrlDomain('thechronicle.com.au', details.url))
updatedUrl += '?amp';
else
updatedUrl = updatedUrl.replace('www.', 'amp.');
return {
redirectUrl: updatedUrl
};
}, {
urls: au_news_corp_subscr,
types: ["main_frame"]
},
{urls:au_news_corp_subscr, types:["main_frame"]},
["blocking"]
);
["blocking"]);
// fix nytimes x-frame-options (hidden iframe content)
ext_api.webRequest.onHeadersReceived.addListener(function (details) {

View File

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Firefox
Post-release
Fix Australia News Corp (amp-redirect)
Fix Faz.net (timing)
Fix The Chronicle (amp-redirect)
Fix The Seattle Times (update)
Fix The Telegraph (modal)
Fix The West Australian (regional)