From 5f5b06b10c57467eebdac60504e54a78e4b3d548 Mon Sep 17 00:00:00 2001 From: eight Date: Thu, 9 Nov 2017 08:16:39 +0800 Subject: [PATCH] Fix: use FIREFOX variable --- js/messaging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/messaging.js b/js/messaging.js index 547a3d0d..114a95b9 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -379,7 +379,7 @@ function download(url) { '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 options.mode = 'same-origin'; // FIXME: add FetchController when it is available.