Browse Source

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.
pull/373/head
Andrea Giammarchi 5 years ago committed by GitHub
parent
commit
953689fedf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/worker-script/index.js

2
src/worker-script/index.js

@ -89,7 +89,7 @@ const loadLanguage = async ({ @@ -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;
}

Loading…
Cancel
Save