aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/login
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-06-13 18:55:27 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2025-06-13 18:55:27 +0530
commit64e38ab240a1ca3427592eb80f2cef57fddbdafe (patch)
treee9fcb0e797a1106e48b6ee716426970cf48b8251 /src/scripts/login
parent00e5ea80b1b0ba37ac4b5dc7b10ae6eac26aa1af (diff)
downloadbanglar-bhumi-utils-64e38ab240a1ca3427592eb80f2cef57fddbdafe.tar.gz
banglar-bhumi-utils-64e38ab240a1ca3427592eb80f2cef57fddbdafe.zip
Sending OCR request along with captcha image data to the background script.
Diffstat (limited to 'src/scripts/login')
-rw-r--r--src/scripts/login/index.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/scripts/login/index.ts b/src/scripts/login/index.ts
index dacc90a..b7e0a73 100644
--- a/src/scripts/login/index.ts
+++ b/src/scripts/login/index.ts
@@ -1,4 +1,3 @@
-import Tesseract from "tesseract.js";
import { interceptPost, interceptGet } from "@/shared/intercept-jquery-ajax";
function prepareCaptcha(ctx: CanvasRenderingContext2D, width: number, height: number) {
@@ -84,7 +83,7 @@ const observer = new MutationObserver((mutationsList, obs) => {
prepareCaptcha(ctx, canvas.width, canvas.height);
canvas.style.display = "";
const dataURL = canvas.toDataURL("image/png");
- chrome.runtime.sendMessage({ type: "ping", data: "hello background" }).then(console.log);
+ chrome.runtime.sendMessage({ type: "OCR", dataURL }, console.log);
// TODO: Perform OCR
// window.postMessage({
// type: "RUN_OCR",