Remove websocket status indicator
This commit is contained in:
parent
ae3a9acffa
commit
f68a8d152f
|
@ -32,7 +32,6 @@
|
|||
<span id="copy-link-text">Click to copy game link!</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="ws-status" style="margin-top: 10px; color: grey">Disconnected</div>
|
||||
<script src="scripts/display-ws-connection.js"></script>
|
||||
<script src="scripts/send-ws-messages.js"></script>
|
||||
<script src="scripts/copy-game-link.js"></script>
|
||||
|
|
|
@ -18,22 +18,3 @@ gameContainer.setAttribute('ws-connect', wsUrl);
|
|||
|
||||
// Tell HTMX to connect the WebSocket
|
||||
htmx.trigger(gameContainer, ' and connect');
|
||||
|
||||
// Update the WebSocket status indicator
|
||||
const wsStatusDiv = document.getElementById('ws-status');
|
||||
|
||||
gameContainer.addEventListener('htmx:wsConnecting', function () {
|
||||
if (wsStatusDiv) wsStatusDiv.textContent = 'Connecting...';
|
||||
});
|
||||
|
||||
gameContainer.addEventListener('htmx:wsOpen', function () {
|
||||
if (wsStatusDiv) wsStatusDiv.textContent = 'Connected';
|
||||
});
|
||||
|
||||
gameContainer.addEventListener('htmx:wsClose', function () {
|
||||
if (wsStatusDiv) wsStatusDiv.textContent = 'Disconnected';
|
||||
});
|
||||
|
||||
gameContainer.addEventListener('htmx:wsError', function () {
|
||||
if (wsStatusDiv) wsStatusDiv.textContent = 'Connection Error';
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue