shellfox/background.js
Jaidyn Ann c34ff80d7d Init
Base proof-of-concept functionality implemented.
That is, we can launch Emacs from Firefox.
… much work remains. :^)
2024-02-27 23:53:53 -06:00

13 lines
237 B
JavaScript

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");
});