Empty usernames or room-names are not allowed #59

Merged
H4CK3R-01 merged 1 commits from block_empty_room_or_user into main 2021-07-11 14:03:13 +00:00
Showing only changes of commit 5fcae6f2e1 - Show all commits

View File

@ -10,6 +10,7 @@ document.getElementById('ok').addEventListener('click', function () {
username = document.getElementById('username').value;
room_name = document.getElementById('room').value;
if (username !== "" && room_name !== "") {
socket = io("/", {
closeOnBeforeunload: false
});
@ -51,6 +52,9 @@ document.getElementById('ok').addEventListener('click', function () {
socket.on('user left', function (data) {
addLogMessage(data + ' left');
});
} else {
document.getElementById('error').innerText = 'Username and/or room name cannot be empty!';
}
});
function open_manual() {