aboutsummaryrefslogtreecommitdiffstats
path: root/src/background/run-ocr.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/run-ocr.ts')
-rw-r--r--src/background/run-ocr.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/background/run-ocr.ts b/src/background/run-ocr.ts
index d0af073..d61e71a 100644
--- a/src/background/run-ocr.ts
+++ b/src/background/run-ocr.ts
@@ -1 +1,7 @@
-console.log("THIS IS A BACKGROUND script.");
+chrome.runtime.onMessage.addListener(async (message, sender, sendResponse) => {
+ if (message.type === "ping") {
+ console.log("Received ping from content script");
+ console.log(message.data);
+ sendResponse({ text: "pong" });
+ }
+});