17 lines
462 B
JavaScript
17 lines
462 B
JavaScript
"use strict";
|
|
|
|
const statusEl = document.getElementById("status");
|
|
const manage = document.getElementById("manage");
|
|
|
|
browser.runtime.sendMessage({ type: "status" }).then((info) => {
|
|
if (info && info.hostUp) {
|
|
statusEl.textContent = `Host connected on 127.0.0.1:${info.port}`;
|
|
} else {
|
|
statusEl.textContent = "Native host is not connected. Is it installed?";
|
|
}
|
|
});
|
|
|
|
manage.addEventListener("click", () => {
|
|
browser.runtime.openOptionsPage();
|
|
});
|