summaryrefslogtreecommitdiff
path: root/card.html
diff options
context:
space:
mode:
Diffstat (limited to 'card.html')
-rw-r--r--card.html13
1 files changed, 8 insertions, 5 deletions
diff --git a/card.html b/card.html
index 0c55b94..53e1574 100644
--- a/card.html
+++ b/card.html
@@ -30,7 +30,8 @@ async function ask({question, answer}, speed=250) {
a = f.answer,
b = f.buzz,
words = question.split(" "),
- answered = false
+ answered = false,
+ proced_answer = false
f.classList.remove("answered")
f.classList.add("answering")
@@ -39,11 +40,13 @@ async function ask({question, answer}, speed=250) {
q.value = words[0]
for (let word of words.slice(1)) {
- if (answered) {
- q.value = question
- break
+ if (answered && !proced_answer) {
+ q.value += " 💡"
+ proced_answer = true
}
- await sleep(speed)
+
+ if (!answered)
+ await sleep(speed)
q.value += " " + word
}
await sleep(speed)