feat(extension): migrate chrome extension v2 to v3

This commit is contained in:
genie
2023-03-16 13:24:55 +08:00
parent 8e477c9d16
commit b67ade3610
7 changed files with 723 additions and 35 deletions

View File

@@ -0,0 +1,12 @@
// This is the service worker script, which executes in its own context
// when the extension is installed or refreshed (or when you access its console).
// It would correspond to the background script in chrome extensions v2.
console.log("This prints to the console of the service worker (background script)");
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
if (request.msg === "sendMessage") {
sendResponse({response: "Message received"});
}
}
);