mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[CRX] Drop code supporting ancient Chrome versions
This commit is contained in:
parent
2c74323e3d
commit
70db938fe7
5 changed files with 24 additions and 76 deletions
|
@ -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",
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue