[CRX] Drop code supporting ancient Chrome versions

This commit is contained in:
Rob Wu 2023-07-02 17:10:17 +02:00
parent 2c74323e3d
commit 70db938fe7
5 changed files with 24 additions and 76 deletions

View file

@ -154,19 +154,7 @@ chrome.webRequest.onBeforeRequest.addListener(
return { redirectUrl: viewerUrl };
},
{
urls: [
"file://*/*.pdf",
"file://*/*.PDF",
...// Duck-typing: MediaError.prototype.message was added in Chrome 59.
(MediaError.prototype.hasOwnProperty("message")
? []
: [
// Note: Chrome 59 has disabled ftp resource loading by default:
// https://www.chromestatus.com/feature/5709390967472128
"ftp://*/*.pdf",
"ftp://*/*.PDF",
]),
],
urls: ["file://*/*.pdf", "file://*/*.PDF"],
types: ["main_frame", "sub_frame"],
},
["blocking"]
@ -252,10 +240,3 @@ chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
}
return undefined;
});
// Remove keys from storage that were once part of the deleted feature-detect.js
chrome.storage.local.remove([
"featureDetectLastUA",
"webRequestRedirectUrl",
"extensionSupportsFTP",
]);