Create
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/** @type {HTMLElement} */
|
||||
var serverList
|
||||
|
||||
window.onload = () => {
|
||||
serverList = document.getElementById("server-list")
|
||||
loadServerList()
|
||||
}
|
||||
|
||||
async function loadServerList() {
|
||||
serversResponse = await fetch("/api/servers", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
token: window.sessionStorage.getItem("session")
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
function addServerElement(name) {
|
||||
const container = new HTMLDivElement()
|
||||
const nameHeader = new HTMLHeadingElement()
|
||||
nameHeader.textContent = name
|
||||
container.appendChild(nameHeader)
|
||||
document.appendChild(container)
|
||||
}
|
||||
Reference in New Issue
Block a user