Simplify logic on new page load
This commit is contained in:
parent
a925d0ae89
commit
57a8b42154
1 changed files with 6 additions and 7 deletions
13
index.html
13
index.html
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue