Simplify logic on new page load

This commit is contained in:
Carlo Piovesan 2022-10-05 13:52:14 +02:00
parent a925d0ae89
commit 57a8b42154

View file

@ -96,13 +96,12 @@
loginElem.onclick = null;
statusElem.innerHTML = "Downloading network code...";
const w = window.open("login.html", "_blank");
w.onload = async () => {
await up();
w.document.body.innerHTML = "Starting login...";
statusElem.innerHTML = "Starting login...";
const url = await loginPromise;
w.location.href = url;
};
async function waitLogin() {
await up();
const url = await loginPromise;
w.location.href = url;
}
waitLogin();
};
</script>
</head>