diff --git a/app/static/js/fillword.js b/app/static/js/fillword.js index 2751a6a..421d972 100644 --- a/app/static/js/fillword.js +++ b/app/static/js/fillword.js @@ -10,12 +10,9 @@ function fillInWord() { if (isRead) Reader.read(word, inputSlider.value); if (!isChoose) return; const element = document.getElementById("selected-words"); - let index = (String)(element.value).indexOf(word); - localStorage.setItem("nowWord",element.value); + localStorage.setItem('nowWords', element.value); + element.value = element.value + " " + word; localStorage.setItem('selectedWords', element.value); - if(index === -1){ - element.value = element.value + " " + word; - } } document.getElementById("text-content").addEventListener("click", fillInWord, false);