Redirect Google AMP cache (opt-in to custom sites)
parent
620abe2dc0
commit
723e5d29ba
|
@ -489,6 +489,20 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) {
|
|||
["blocking"]
|
||||
);
|
||||
|
||||
// Google AMP cache redirect
|
||||
ext_api.webRequest.onBeforeRequest.addListener(function (details) {
|
||||
var url = details.url.split('?')[0];
|
||||
var updatedUrl;
|
||||
if (matchUrlDomain('cdn.ampproject.org', url))
|
||||
updatedUrl = 'https://' + url.split(/cdn\.ampproject\.org\/[a-z]\/s\//)[1];
|
||||
else if (matchUrlDomain('google.com', url))
|
||||
updatedUrl = 'https://' + url.split(/\.google\.com\/amp\/s\//)[1];
|
||||
return { redirectUrl: decodeURIComponent(updatedUrl) };
|
||||
},
|
||||
{urls:["*://*.cdn.ampproject.org/*/s/*", "*://*.google.com/amp/s/*"], types:["main_frame"]},
|
||||
["blocking"]
|
||||
);
|
||||
|
||||
// inkl bypass
|
||||
ext_api.webRequest.onBeforeRequest.addListener(function (details) {
|
||||
if (!isSiteEnabled(details)) {
|
||||
|
|
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Chrome
|
|||
|
||||
Post-release
|
||||
Add Tagesspiegel.de
|
||||
Redirect Google AMP cache (opt-in to custom sites)
|
||||
|
||||
* v2.7.8.0 (2022-07-31)
|
||||
Add Crusoe (Brazil)
|
||||
|
|
Loading…
Reference in New Issue