LocalhostBunny/webassets/scripts/script.js

17 lines
415 B
JavaScript
Raw Normal View History

2023-12-01 13:44:58 +01:00
function updateHTML() {
const main = document.getElementById('maincontent')
let html = '';
for (const srv of servers) {
html += `<a class="server" href="${srv['protocol'].toLowerCase()}://localhost:${srv['port']}">${encodeURIComponent(srv['process'])} @ ${encodeURIComponent(srv['port'])}</a>`
}
main.innerHTML = html;
}
document.addEventListener("DOMContentLoaded", updateHTML);