add refresh button that uses url base if given

This commit is contained in:
Harvey Tindall
2021-01-27 21:51:01 +00:00
parent 764639bbba
commit 79987ffa22
3 changed files with 11 additions and 4 deletions
+8 -3
View File
@@ -317,9 +317,14 @@ const serialize = () => {
_post("/config", config, (req: XMLHttpRequest) => {
if (req.readyState == 4) {
toggleLoader(restartButton);
restartButton.classList.add("~positive");
restartButton.classList.remove("~urge");
restartButton.textContent = window.lang.strings("success");
restartButton.parentElement.querySelector("span.back").classList.add("unfocused");
restartButton.classList.add("unfocused");
const refresh = document.getElementById("refresh") as HTMLSpanElement;
refresh.classList.remove("unfocused");
refresh.onclick = () => {
let host = window.location.href.split("#")[0].split("?")[0] + settings["ui"]["url_base"].value;
window.location.href = host;
};
}
}, true, true);
}