| @@ -28,7 +28,7 @@ app.get("/words", (req, res) => { | |||
| }); | |||
| app.post("/remove/:index", (req, res) => { | |||
| res.end(); | |||
| res.json({}); | |||
| if (!req.params.index) | |||
| return; | |||
| @@ -52,7 +52,7 @@ app.post("/remove/:index", (req, res) => { | |||
| }); | |||
| app.post("/add/:name", (req, res) => { | |||
| res.end(); | |||
| res.json({}); | |||
| if (!req.params.name) | |||
| return; | |||
| @@ -11,7 +11,7 @@ elemSuggestions.hide = function() { | |||
| elemSuggestions.className = "suggestions hidden"; | |||
| setTimeout(function() { | |||
| elemSuggestions.style.display = "none"; | |||
| }, 500); | |||
| }, 100); | |||
| } | |||
| elemSuggestions.hide(); | |||
| @@ -125,9 +125,6 @@ elemAdd.addEventListener("submit", function(evt) { | |||
| post("/add/"+encodeURIComponent(elemName.value)); | |||
| elemName.value = ""; | |||
| setTimeout(function() { | |||
| elemName.blur(); | |||
| }, 1); | |||
| }); | |||
| function displaySuggestions() { | |||
| @@ -59,8 +59,9 @@ html, body { | |||
| padding-top: 6px; | |||
| padding-bottom: 6px; | |||
| max-height: 80%; | |||
| max-height: 70%; | |||
| overflow-y: auto; | |||
| overflow-x: hidden; | |||
| } | |||
| #add .suggestions.hidden { | |||
| opacity: 0; | |||
| @@ -72,6 +73,9 @@ html, body { | |||
| padding: 12px; | |||
| cursor: pointer; | |||
| border-bottom: 1px solid #ccc; | |||
| text-overflow: ellipsis; | |||
| max-width: 100%; | |||
| overflow: hidden; | |||
| } | |||
| #list { | |||