Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
refresh button
  • Loading branch information
Guerrero96 committed May 2, 2024
1 parent aeb89a6 commit fb8071b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ <h3>Current Words</h3>
</div>
</div>

<button id="refreshButton">Refresh</button>

<script>
var connection = null;
var serverUrl = "ws://" + window.location.hostname + ":9108";
Expand Down Expand Up @@ -184,6 +186,7 @@ <h3>Current Words</h3>
function setupGameScreen(grid, players) {
document.getElementById('lobby-container').style.display = 'none';
document.getElementById('game-container').style.display = 'block';
document.getElementById('players-in-lobby').innerHTML = '';

var gridTable = document.getElementById('game-grid');
gridTable.innerHTML = '';
Expand Down Expand Up @@ -389,7 +392,12 @@ <h3>Current Words</h3>
connection.send(JSON.stringify({ action: "ready" }));
document.getElementById("ready-button").disabled = true;
});

document.getElementById("refreshButton").addEventListener("click", function () {
// Implement your refresh logic here
connection.send(JSON.stringify({ action: "refresh" }));
});
</script>
</body>

</html>
</html>

0 comments on commit fb8071b

Please sign in to comment.