diff options
Diffstat (limited to 'src/background')
| -rw-r--r-- | src/background/run-ocr.ts | 8 | ||||
| -rw-r--r-- | src/background/second-script.ts | 1 |
2 files changed, 7 insertions, 2 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" }); + } +}); diff --git a/src/background/second-script.ts b/src/background/second-script.ts deleted file mode 100644 index 9e3a621..0000000 --- a/src/background/second-script.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("THiS IS THE SECOND SCRIPT"); |
