about summary refs log tree commit diff
path: root/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'script.js')
-rw-r--r--script.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/script.js b/script.js
index dad4b58..b9e8bc7 100644
--- a/script.js
+++ b/script.js
@@ -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) {