From e3abc6e3c4537637259f7327058d453f6333d949 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 7 Dec 2020 17:26:19 +0000 Subject: [PATCH] corrected the nospace wpm calculation --- functions/index.js | 8 ++++---- src/js/script.js | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/functions/index.js b/functions/index.js index 285348b2d..9c029b4ab 100644 --- a/functions/index.js +++ b/functions/index.js @@ -946,10 +946,10 @@ exports.testCompleted = functions.https.onRequest(async (request, response) => { return user.emailVerified; }); - if (obj.funbox === "nospace") { - response.status(200).send({ data: { resultCode: -1 } }); - return; - } + // if (obj.funbox === "nospace") { + // response.status(200).send({ data: { resultCode: -1 } }); + // return; + // } return db .collection("users") diff --git a/src/js/script.js b/src/js/script.js index 52f26993e..cf73ef3b3 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -1621,6 +1621,10 @@ function countChars() { spaces++; } } + if (activeFunBox === "nospace") { + spaces = 0; + correctspaces = 0; + } return { spaces: spaces, correctWordChars: correctWordChars,