From caa863f358209117260911b88dca65a95948605d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 28 Jul 2022 17:06:49 +0200 Subject: Autocomplete "description" with pre-defined "speeds". --- public/common/play.js | 2 +- views/create.pug | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/common/play.js b/public/common/play.js index 12bc47b..6ac9355 100644 --- a/public/common/play.js +++ b/public/common/play.js @@ -541,7 +541,7 @@ function confirm_action_button(action, label, message) { function send_action(verb, noun) { if (params.mode === "replay" || params.mode === "debug") - return + return false // Reset action list here so we don't send more than one action per server prompt! if (noun !== undefined) { let realnoun = Array.isArray(noun) ? noun[0] : noun diff --git a/views/create.pug b/views/create.pug index 0da379b..42d3a46 100644 --- a/views/create.pug +++ b/views/create.pug @@ -26,7 +26,15 @@ html | !{ create_html } p Description: br - input(type="text" autocomplete="off" name="description" size=50) + input(type="text" list="speed" autocomplete="off" name="description" size=50) + datalist(id="speed") + option Async - 1 move per day + option Async - x moves per day + option Live - America + option Live - Europe + option Live - Asia + option Live - Oceania + option Learning game p label input(type="checkbox" name="is_random" value="true") -- cgit v1.2.3