Commit 93f11602 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Clear user list upon disconnection.

parent eac7a2af
......@@ -32,6 +32,9 @@ function getUsername() {
return userpass.username;
}
/**
* @param{boolean} connected
*/
function setConnected(connected) {
let statspan = document.getElementById('statspan');
let userform = document.getElementById('userform');
......@@ -48,6 +51,7 @@ function setConnected(connected) {
disconnectbutton.classList.remove('invisible');
displayUsername();
} else {
resetUsers();
let userpass = getUserPass();
document.getElementById('username').value =
userpass ? userpass.username : '';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment