From e9ecc4f9ce45456126bf87591b6a736e77be31a7 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 6 Sep 2020 02:51:35 +0100 Subject: [PATCH] only allowing 20 mistakes --- public/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/script.js b/public/js/script.js index ca5d54813..dbfbba898 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -3733,7 +3733,7 @@ $(document).keypress(function (event) { } } - currentInput += event["key"]; + if(currentInput.length < wordsList[currentWordIndex].length + 20) currentInput += event["key"]; setFocus(true); stopCaretAnimation(); activeWordTopBeforeJump = activeWordTop;