Update foo

This commit is contained in:
Dominic Zimmer
2020-04-19 21:20:12 +02:00
parent 30515c4328
commit d386c771f0
5 changed files with 171 additions and 161 deletions

View File

@@ -0,0 +1,9 @@
var text = document.getElementById("msg").innerText
msg = JSON.parse(text)
document.getElementById("btn-leave-session").onclick = async (e) => await fetch('api/leave_session', {
method: 'POST', body: JSON.stringify({})
});
var session = msg.session;
document.getElementById("session").innerText = session["name"];
document.getElementById('label-username').innerText = msg.username;

View File

@@ -0,0 +1,3 @@
Welcome to <b id="session"></b>, <span id="label-username"></span>
<br><br>
<button id="btn-leave-session">Leave Session</button>