From 5a7576ceb4b862380751a110d4467c3e0ec94cdd Mon Sep 17 00:00:00 2001 From: Andrea Giammarchi Date: Tue, 17 Dec 2019 17:37:06 +0100 Subject: [PATCH] Enable moz-extension:// too This is a follow up for https://github.com/naptha/tesseract.js/pull/373 --- src/worker/node/loadImage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker/node/loadImage.js b/src/worker/node/loadImage.js index 91ab15a..96f7734 100644 --- a/src/worker/node/loadImage.js +++ b/src/worker/node/loadImage.js @@ -19,7 +19,7 @@ module.exports = async (image) => { } if (typeof image === 'string') { - if (isURL(image) || image.startsWith('chrome-extension://') || image.startsWith('file://')) { + if (isURL(image) || image.startsWith('moz-extension://') || image.startsWith('chrome-extension://') || image.startsWith('file://')) { const { data: _data } = await axios.get(image, { responseType: 'arraybuffer' }); data = _data; } else if (/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(image)) {