From ebd7a894cf79e1110ee37e9cc1d6598235d8d4ee Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 31 May 2020 15:37:09 +0100 Subject: [PATCH] made sure the displayed data is rounded --- public/js/account.js | 6 +++--- public/js/script.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/account.js b/public/js/account.js index fbbf1d470..412758c8a 100644 --- a/public/js/account.js +++ b/public/js/account.js @@ -414,9 +414,9 @@ function loadMoreLines(){ $(".pageAccount .history table tbody").append(` - ${result.wpm} - ${raw} - ${result.acc}% + ${Math.round(result.wpm)} + ${Math.round(raw)} + ${Math.round(result.acc)}% ${result.correctChars} ${result.incorrectChars} ${result.mode} ${result.mode2}${withpunc} diff --git a/public/js/script.js b/public/js/script.js index 933e5437a..7dcd24c53 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -510,9 +510,9 @@ function showResult(difficultyFailed = false) { } clearIntervals(); let testtime = roundedToFixed(stats.time,1); - $("#result .stats .wpm .bottom").text(stats.wpm); - $("#result .stats .raw .bottom").text(stats.wpmRaw); - $("#result .stats .acc .bottom").text(stats.acc + "%"); + $("#result .stats .wpm .bottom").text(Math.round(stats.wpm)); + $("#result .stats .raw .bottom").text(Math.round(stats.wpmRaw)); + $("#result .stats .acc .bottom").text(Math.round(stats.acc) + "%"); $("#result .stats .key .bottom").text(stats.correctChars + stats.spaces + "/" + stats.incorrectChars); $("#result .stats .time .bottom").text(testtime+'s');