mirror of
https://github.com/lil-org/tokenary.git
synced 2025-01-05 20:16:25 +03:00
12 lines
441 B
JavaScript
12 lines
441 B
JavaScript
|
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||
|
console.log("Received request: ", request);
|
||
|
|
||
|
browser.runtime.sendNativeMessage("ink.encrypted.macos", {message: "Hello from background page"}, function(response) {
|
||
|
console.log("Received sendNativeMessage response:");
|
||
|
console.log(response);
|
||
|
});
|
||
|
|
||
|
if (request.greeting === "hello")
|
||
|
sendResponse({ farewell: "goodbye" });
|
||
|
});
|