diff --git a/Open Media Library.app/Contents/Resources/static/js/install.js b/Open Media Library.app/Contents/Resources/static/js/install.js index fa100f7..d107042 100644 --- a/Open Media Library.app/Contents/Resources/static/js/install.js +++ b/Open Media Library.app/Contents/Resources/static/js/install.js @@ -1,10 +1,15 @@ function load() { - var base = 'http://[::1]:9842', - img = new Image(); - img.onload = function(event) { - document.location.href = base; + var base = '//[::1]:9842', + ws = new WebSocket('ws:' + base + '/ws'); + ws.onopen = function(event) { + document.location.href = 'http:' + base; + }; + ws.onerror = function(event) { + ws.close(); + }; + ws.onclose = function(event) { + setTimeout(load, 500); }; - img.src = base + '/static/oxjs/build/Ox.UI/png/transparent.png?' + new Date; }; function update() {