Document who can call the loopback API and let the user pick the listen port.
This commit is contained in:
+8
-4
@@ -4,11 +4,15 @@ const statusEl = document.getElementById("status");
|
||||
const manage = document.getElementById("manage");
|
||||
|
||||
browser.runtime.sendMessage({ type: "status" }).then((info) => {
|
||||
if (info && info.hostUp) {
|
||||
statusEl.textContent = "Ready for agents and scripts while Firefox is open.";
|
||||
} else {
|
||||
statusEl.textContent = "You can issue and revoke secrets here.";
|
||||
if (info && info.bindError) {
|
||||
statusEl.textContent = `Port ${info.listenPort} is not available.`;
|
||||
return;
|
||||
}
|
||||
if (info && info.hostUp) {
|
||||
statusEl.textContent = `Ready on 127.0.0.1:${info.listenPort} while Firefox is open.`;
|
||||
return;
|
||||
}
|
||||
statusEl.textContent = "You can issue and revoke secrets here.";
|
||||
});
|
||||
|
||||
manage.addEventListener("click", () => {
|
||||
|
||||
Reference in New Issue
Block a user