From c19b0fe5212d0c5c6db3155c009f661660e5e2c0 Mon Sep 17 00:00:00 2001 From: mappu Date: Sun, 5 Feb 2017 17:15:20 +1300 Subject: [PATCH] also load stock username text when we get a reconnect page --- client/dcwebui.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/dcwebui.js b/client/dcwebui.js index e7cf98e..efa8c04 100644 --- a/client/dcwebui.js +++ b/client/dcwebui.js @@ -688,11 +688,6 @@ var persistence_get = function(key, fallback) { window.onload = function() { write("tab-main").system("Communicating with server..."); - var pre_login = persistence_get("login", ""); - if (pre_login.indexOf(":") !== -1) { - pre_login = pre_login.substr(0, pre_login.indexOf(":")) + ":" + SENTINEL_PASSWORD; - } - $("#chatbox").value = pre_login; show_joins = persistence_get("show_joins", false); document.title = DCWEBUI_CONF.title; @@ -756,6 +751,12 @@ window.onload = function() { sock.on('cls', function() { hub_state = 0; + var pre_login = persistence_get("login", ""); + if (pre_login.indexOf(":") !== -1) { + pre_login = pre_login.substr(0, pre_login.indexOf(":")) + ":" + SENTINEL_PASSWORD; + } + $("#chatbox").value = pre_login; + if (!have_cleared_once) { write("tab-main").cls(); userlist.clear();