Code
·
23 lines
·
546 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23onReady(() =>
{
document.addEventListener("click", async function (e)
{
if (e.target.id && typeof window[e.target.id] === "function")
{
e.preventDefault();
const result = window[e.target.id].call(e, e);
if (result instanceof Promise)
await result;
}
});
});
async function getstatus()
{
const result = await netproxyasync("/api/status/all");
document.getElementById("status").innerText =
' Smtp:' + result.IsSmtpRunning + '\n' +
' Imap:' + result.IsImapRunning + '\n' +
' Pop3:' + result.IsPop3Running + '\n';
}