summaryrefslogtreecommitdiff
path: root/app/public/sock.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/public/sock.js')
-rw-r--r--app/public/sock.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/public/sock.js b/app/public/sock.js
index b4905e5..72e00ec 100644
--- a/app/public/sock.js
+++ b/app/public/sock.js
@@ -1,4 +1,3 @@
-const sock = (() => { "use strict";
const refresh = () => setTimeout(() => location.reload(), 1e3);
let ws, pingTimeout;
@@ -12,7 +11,7 @@ const handlers = {
}],
};
-const sock = {
+export const sock = {
init: url => {
ws = new WebSocket(url);
ws.addEventListener("close", refresh);
@@ -39,5 +38,3 @@ const sock = {
else prequeue.push([type, data]);
},
};
-
-return sock })();