13 lines
237 B
JavaScript
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");
|
||
|
});
|