shellfox/background.js

13 lines
237 B
JavaScript
Raw Normal View History

let port = browser.runtime.connectNative("shellfox");
port.onDisconnect.addListener((port) => {
console.log(port.error);
port = undefined;
});
browser.pageAction.onClicked.addListener(() => {
port.postMessage("emacs /tmp/f");
});