From 0dc96edcf89fb70510531ef472775998941295e6 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Sat, 14 Jun 2025 10:53:35 +0530 Subject: Bumped up version to 2.0.0 --- src/offscreen/ocr/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/offscreen/ocr/index.js') diff --git a/src/offscreen/ocr/index.js b/src/offscreen/ocr/index.js index 7390bbf..b935024 100644 --- a/src/offscreen/ocr/index.js +++ b/src/offscreen/ocr/index.js @@ -1,12 +1,14 @@ import Tesseract from "./tesseract.esm.min.js"; let ocrWorker = null; +const WORKER_PATH = chrome.runtime.getURL("/offscreen/ocr/static/worker.min.js"); +const CORE_PATH = chrome.runtime.getURL("/offscreen/ocr/static"); async function performOcrInOffscreen(dataURL) { if (!ocrWorker) { ocrWorker = await Tesseract.createWorker("eng", 1, { - workerPath: chrome.runtime.getURL("/offscreen/ocr/worker.min.js"), - corePath: chrome.runtime.getURL("/offscreen/ocr"), + workerPath: WORKER_PATH, + corePath: CORE_PATH, workerBlobURL: false, }); -- cgit v1.2.3