get better names

This commit is contained in:
2023-12-02 01:01:16 +01:00
parent 6e98701299
commit 288fa282b4
13 changed files with 212 additions and 13 deletions

View File

@@ -1,4 +1,6 @@
function enc(v) { return `${v}`.replace(/[\u00A0-\u9999<>&]/g, i => '&#'+i.charCodeAt(0)+';') }
function updateHTML() {
const main = document.getElementById('maincontent')
@@ -7,7 +9,11 @@ function updateHTML() {
for (const srv of servers) {
html += `<a class="server" href="${srv['protocol'].toLowerCase()}://localhost:${srv['port']}">${encodeURIComponent(srv['process'])} @ ${encodeURIComponent(srv['port'])}</a>`
html += `<a class="server" href="${srv['protocol'].toLowerCase()}://localhost:${srv['port']}" target="_blank">`;
html += `<span class="txt_icon"><img src="/icons/microchip-sharp-solid.svg" alt="process"></span>`
html += `<span class="txt_name">${enc(srv['name'])}</span>`
html += `<span class="txt_port">${enc(srv['port'])}</span>`
html += `</a>`;
}
main.innerHTML = html;