From df04af0f38583120d5ba5c620a848e12c933331d Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 6 Aug 2020 10:55:33 -0700 Subject: [PATCH] Websocket refactor: Pull it out of the UI and support callbacks (#104) * Websocket refactor: Pull it out of the UI and support listeners * Changes required for Safari to be happy with modules * Move to explicit ad-hoc callback registration --- webroot/index.html | 16 +-- webroot/js/app.js | 82 ++++++--------- webroot/js/chat/socketMessageTypes.js | 11 ++ webroot/js/message.js | 38 +++---- webroot/js/player.js | 29 ++++++ webroot/js/utils.js | 67 +----------- webroot/js/websocket.js | 142 ++++++++++++++++++++++++++ 7 files changed, 246 insertions(+), 139 deletions(-) create mode 100644 webroot/js/chat/socketMessageTypes.js create mode 100644 webroot/js/websocket.js diff --git a/webroot/index.html b/webroot/index.html index a7e356dd4..b9e112ee8 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -181,16 +181,16 @@ - + - - -