mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
[CRX] Stop intercepting ftp in Chrome 59+
The extension cannot easily fetch data from ftp:-resources any more in Chrome 59+. So don't intercept such URLs.
This commit is contained in:
parent
b67f117b56
commit
df516c0a52
1 changed files with 10 additions and 4 deletions
|
@ -153,10 +153,16 @@ chrome.webRequest.onBeforeRequest.addListener(
|
|||
urls: [
|
||||
'file://*/*.pdf',
|
||||
'file://*/*.PDF',
|
||||
// Note: Chrome 59 has disabled ftp resource loading by default:
|
||||
// https://www.chromestatus.com/feature/5709390967472128
|
||||
'ftp://*/*.pdf',
|
||||
'ftp://*/*.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',
|
||||
]
|
||||
),
|
||||
],
|
||||
types: ['main_frame', 'sub_frame'],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue