change hostname button
This commit is contained in:
@@ -1309,6 +1309,13 @@ let hostNameText = document.getElementById("host-name");
|
||||
hostNameBtn.addEventListener("click", () => {
|
||||
hostNameText.innerText = hostNameInput.value;
|
||||
localStorage.setItem("hostName", hostNameText.innerText);
|
||||
|
||||
data = {hostname:hostNameText.innerText}
|
||||
|
||||
fetch("/hostname", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
});
|
||||
|
||||
// change brightness
|
||||
|
Reference in New Issue
Block a user