fixed incorrect username reporting

This commit is contained in:
2026-05-31 16:13:31 +01:00
parent 9378ab8fed
commit af1847f5e9
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -2,3 +2,4 @@
hiscores.json
loscores.json
pingscores.json
.*
+5 -5
View File
@@ -37,14 +37,14 @@
</style>
<script>
const regex = new RegExp("^[a-zA-Z0-9_-]+$");
const ws = new WebSocket('ws://deadvey.com:8084/ws');
let name = validate_data(prompt("Nickname for the leaderboard"));
const ws = new WebSocket('ws://localhost:8084/ws');
console.log(name)
let latestMessage = 0;
ws.onopen = (event) => {
ws_leaderboard.send(name);
let name = validate_data(prompt("Nickname for the leaderboard"));
ws.send(name);
}
const ws_leaderboard = new WebSocket('ws://deadvey.com:8084/ws-leaderboard');
const ws_leaderboard = new WebSocket('ws://localhost:8084/ws-leaderboard');
ws_leaderboard.onopen = (event) => {
ws_leaderboard.send("1");
};
@@ -73,7 +73,7 @@
}
function send_click()
{
ws.send(true);
ws.send("");
if (latestMessage !== null) {
document.getElementById("button").textContent=latestMessage;
latestMessage = null;
BIN
View File
Binary file not shown.