diff --git a/public/index.html b/public/index.html index c13c85f35..ee531841d 100644 --- a/public/index.html +++ b/public/index.html @@ -705,7 +705,7 @@
char
-
-
+
-
diff --git a/public/js/script.js b/public/js/script.js index abe6424fd..7f68a7c0c 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -1379,6 +1379,15 @@ function showResult(difficultyFailed = false) { $("#result .stats .raw .bottom").attr("aria-label", stats.wpmRaw); $("#result .stats .acc .bottom").text(Math.floor(stats.acc) + "%"); $("#result .stats .acc .bottom").attr("aria-label", stats.acc + "%"); + + let correctcharpercent = roundTo2( + ((stats.correctChars + stats.correctSpaces) / + (stats.correctChars + stats.correctSpaces + stats.incorrectChars)) * + 100 + ); + $("#result .stats .key .bottom").text(testtime + "s"); + $("#result .stats .key .bottom").attr("aria-label", `${correctcharpercent}%`); + $("#result .stats .key .bottom").text( stats.correctChars + stats.correctSpaces + "/" + stats.incorrectChars );