Fix: use FIREFOX variable

This commit is contained in:
eight 2017-11-09 08:16:39 +08:00
parent 2b614bdee2
commit 5f5b06b10c

View File

@ -379,7 +379,7 @@ function download(url) {
'Content-type': 'application/x-www-form-urlencoded' 'Content-type': 'application/x-www-form-urlencoded'
} }
}; };
if (url.protocol === 'file:' && navigator.userAgent.includes('Firefox')) { if (url.protocol === 'file:' && FIREFOX) {
// https://stackoverflow.com/questions/42108782/firefox-webextensions-get-local-files-content-by-path // https://stackoverflow.com/questions/42108782/firefox-webextensions-get-local-files-content-by-path
options.mode = 'same-origin'; options.mode = 'same-origin';
// FIXME: add FetchController when it is available. // FIXME: add FetchController when it is available.