Set server's own address in socket.io test page

This commit is contained in:
Martin Boehm 2018-03-01 11:34:02 +01:00
parent 665a3d1230
commit 7db39fcc13

View File

@ -217,7 +217,7 @@
<input class="btn btn-secondary" type="button" value="Login" onclick="connect(document.getElementById('serverAddress').value)">
</div>
<div class="col-8">
<input type="text" class="form-control" id="serverAddress" value="wss://localhost:8334">
<input type="text" class="form-control" id="serverAddress" value="">
</div>
<div class="col form-inline">
<label id="connectionStatus">not connected</label>
@ -345,5 +345,8 @@
</div>
</div>
</body>
<script>
document.getElementById('serverAddress').value = window.location.protocol.replace("http", "ws") + "//" + window.location.host;
</script>
</html>