Remove websocket status indicator

This commit is contained in:
sepia 2025-07-20 19:55:23 -05:00
parent ae3a9acffa
commit f68a8d152f
2 changed files with 0 additions and 20 deletions

View File

@ -32,7 +32,6 @@
<span id="copy-link-text">Click to copy game link!</span> <span id="copy-link-text">Click to copy game link!</span>
</button> </button>
</div> </div>
<div id="ws-status" style="margin-top: 10px; color: grey">Disconnected</div>
<script src="scripts/display-ws-connection.js"></script> <script src="scripts/display-ws-connection.js"></script>
<script src="scripts/send-ws-messages.js"></script> <script src="scripts/send-ws-messages.js"></script>
<script src="scripts/copy-game-link.js"></script> <script src="scripts/copy-game-link.js"></script>

View File

@ -18,22 +18,3 @@ gameContainer.setAttribute('ws-connect', wsUrl);
// Tell HTMX to connect the WebSocket // Tell HTMX to connect the WebSocket
htmx.trigger(gameContainer, ' and connect'); 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';
});