commit 3f03d3ba586063c15c909936fad0d93e5c1bce6c
parent e6ee3438bb425e8bdb3ab6a72c3ecc0344fc087f
Author: MTRNord <mtrnord1@gmail.com>
Date: Thu, 24 Mar 2016 13:20:21 +0100
Update websocket connection
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/theme/index.html b/web/theme/index.html
@@ -165,7 +165,8 @@
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
- var socket = io('ws://localhost:3000');
+ var ws = 'ws://'+location.hostname+(location.port ? ':'+location.port: '');
+ var socket = io(ws);
$(document).off('click', '#restart').on('click', '#restart', function (e) {
console.log('restart fired');