From 68777ec421d41be0da27013afd4165ae7d658d26 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Mon, 13 Jul 2026 23:17:25 +0530 Subject: refactor: added linting with esling and also resolved warnings for it --- src/offscreen/ocr/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/offscreen') diff --git a/src/offscreen/ocr/index.js b/src/offscreen/ocr/index.js index 9cbd19f..dfe93c9 100644 --- a/src/offscreen/ocr/index.js +++ b/src/offscreen/ocr/index.js @@ -18,12 +18,12 @@ async function performOcrInOffscreen(dataURL) { ocrWorker = await Tesseract.createWorker("eng", 1, { workerPath: WORKER_PATH, corePath: CORE_PATH, - workerBlobURL: false, + workerBlobURL: false }); await ocrWorker.setParameters({ // The only characters that appears - tessedit_char_whitelist: "ABCDEFGHJKLMNPQRSTUVWXYZ23456789", + tessedit_char_whitelist: "ABCDEFGHJKLMNPQRSTUVWXYZ23456789" }); } @@ -40,10 +40,10 @@ async function performOcrInOffscreen(dataURL) { chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => { if (message.type === "OFFSCREEN_OCR_REQUEST" && message.dataURL) { performOcrInOffscreen(message.dataURL) - .then(({ text, confidence }) => { + .then(function({ text, confidence }) { sendResponse({ success: true, text, confidence }); }) - .catch(error => { + .catch(function(error) { sendResponse({ success: false, error: error.message }); }); return true; -- cgit v1.2.3