Still waiting for the New York Times to send me a bogus takedown notice
Diffstat (limited to 'script.js')
| -rw-r--r-- | script.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -14,6 +14,12 @@ fetch(url) .then(wordlist => wordlist.split('\n')) .then(wordlist => main(wordlist)); +let guessable = [] +fetch("guessable") +.then(response => response.text()) +.then(wordlist => wordlist.split('\n')) +.then(function(g){guessable = g;}) + function addGuessDisplay(answer, guess, len, hint) { let cat = "" @@ -36,7 +42,7 @@ function checkAnswer(event, answer, len, wordlist) { input.value = input.value.toLowerCase(); if (!exit) { - if (wordlist.includes(input.value)) { + if (wordlist.includes(input.value) || guessable.includes(input.value)) { addGuessDisplay(answer, input.value, len, hint); tries++; if (input.value == answer) { |