USERNAMES

This commit is contained in:
Dominic Zimmer
2020-04-17 02:48:40 +02:00
parent 364d155f9d
commit 8fe6fa4884
5 changed files with 22 additions and 11 deletions

View File

@@ -10,6 +10,9 @@ ws.onmessage = function(event) {
if (msg.hasOwnProperty('currentsession')) {
document.getElementById('current_session').innerText = msg.currentsession;
}
if (msg.hasOwnProperty('username')) {
document.getElementById('greeting').innerText = "Hello, " + msg.username + "!";
}
if (msg.hasOwnProperty('allsessions')) {
const all_sessions = document.getElementById('all_sessions');
@@ -25,4 +28,4 @@ ws.onmessage = function(event) {
all_sessions.appendChild(button);
}
}
};
};