From: Christian Heller Date: Wed, 28 Oct 2020 20:37:19 +0000 (+0100) Subject: Improve Firefox experience by not using / for client commands. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=8f93c0c58d4bf9ba2a83e0c7e474045a0dd7178e;p=plomrogue2-experiments Improve Firefox experience by not using / for client commands. --- diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html index bea6f0a..72ac10c 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -218,11 +218,11 @@ let tui = { tui.log_msg("HELP"); tui.log_msg(""); tui.log_msg("chat mode commands:"); - tui.log_msg("/login USER - register as USER"); - tui.log_msg("/msg USER TEXT - send TEXT to USER"); - tui.log_msg("/help - show this help"); - tui.log_msg("/play or /p - switch to play mode"); - tui.log_msg("/study or /s - switch to study mode"); + tui.log_msg(":login USER - register as USER"); + tui.log_msg(":msg USER TEXT - send TEXT to USER"); + tui.log_msg(":help - show this help"); + tui.log_msg(":play or :p - switch to play mode"); + tui.log_msg(":study or :s - switch to study mode"); tui.log_msg(""); tui.log_msg("play mode commands:"); tui.log_msg("w, a, s, d - move avatar"); @@ -394,21 +394,21 @@ document.addEventListener('keydown', (event) => { } else if (event.key == 'Enter') { let [tokens, token_starts] = parser.tokenize(tui.input_line); if (tokens.length > 0 && tokens[0].length > 0) { - if (tokens[0][0] == '/') { - if (tokens[0] == '/play' || tokens[0] == '/p') { + if (tokens[0][0] == ':') { + if (tokens[0] == ':play' || tokens[0] == ':p') { tui.switch_mode('play'); - } else if (tokens[0] == '/study' || tokens[0] == '/s') { + } else if (tokens[0] == ':study' || tokens[0] == ':s') { tui.switch_mode('study'); - } else if (tokens[0] == '/help') { + } else if (tokens[0] == ':help') { tui.log_help(); tui.refresh(); - } else if (tokens[0] == '/login') { + } else if (tokens[0] == ':login') { if (tokens.length > 1) { websocket.send('LOGIN ' + quote(tokens[1])); } else { tui.log_msg('? need login name'); } - } else if (tokens[0] == '/msg') { + } else if (tokens[0] == ':msg') { if (tokens.length > 2) { let msg = tui.input_line.slice(token_starts[2]); websocket.send('QUERY ' + quote(tokens[1]) + ' ' + quote(msg));