From 953689fedfa762af63fba709ec74eaa96a5f594d Mon Sep 17 00:00:00 2001 From: Andrea Giammarchi Date: Tue, 17 Dec 2019 16:35:08 +0100 Subject: [PATCH] Enable Firefox extesions too AFAIK this library has no particular reason to ditch Firefox extensions. I have tested with above changes applied and I can finally use OCR within Firefox too. Thanks for considering this change. --- src/worker-script/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker-script/index.js b/src/worker-script/index.js index 4d9c33f..56cdb4f 100644 --- a/src/worker-script/index.js +++ b/src/worker-script/index.js @@ -89,7 +89,7 @@ const loadLanguage = async ({ if (typeof _lang === 'string') { let path = null; - if (isURL(langPath) || langPath.startsWith('chrome-extension://') || langPath.startsWith('file://')) { /** When langPath is an URL */ + if (isURL(langPath) || langPath.startsWith('moz-extension://') || langPath.startsWith('chrome-extension://') || langPath.startsWith('file://')) { /** When langPath is an URL */ path = langPath; }