wip
This commit is contained in:
@@ -6,8 +6,14 @@
|
|||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
let host = window.location.host;
|
||||||
|
|
||||||
|
if (host.indexOf(":") != -1) {
|
||||||
|
host = host.substr(0,host.indexOf(":"));
|
||||||
|
}
|
||||||
|
|
||||||
// Replace 'ws://localhost/ws' with your WebSocket server address
|
// Replace 'ws://localhost/ws' with your WebSocket server address
|
||||||
var ws = new WebSocket('ws://'+window.location.host+':1025/ws');
|
var ws = new WebSocket('ws://'+host+':1025/ws');
|
||||||
|
|
||||||
ws.onopen = function() {
|
ws.onopen = function() {
|
||||||
console.log('WebSocket connection established');
|
console.log('WebSocket connection established');
|
||||||
|
|||||||
Reference in New Issue
Block a user