mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-11 09:34:35 +08:00
live wpm shows raw instead of wpm when blind mode is enabled
This commit is contained in:
parent
c8a93c28f8
commit
cdb1e2dbdf
1 changed files with 8 additions and 4 deletions
|
@ -2422,7 +2422,7 @@ function startTest() {
|
|||
// wpmHistory.push(wpm);
|
||||
// rawHistory.push(liveRaw());
|
||||
let wpmAndRaw = liveWpmAndRaw();
|
||||
updateLiveWpm(wpmAndRaw.wpm);
|
||||
updateLiveWpm(wpmAndRaw.wpm, wpmAndRaw.raw);
|
||||
wpmHistory.push(wpmAndRaw.wpm);
|
||||
rawHistory.push(wpmAndRaw.raw);
|
||||
|
||||
|
@ -2879,15 +2879,19 @@ function liveWpmAndRaw() {
|
|||
};
|
||||
}
|
||||
|
||||
function updateLiveWpm(wpm) {
|
||||
function updateLiveWpm(wpm,raw) {
|
||||
if (!testActive || !config.showLiveWpm) {
|
||||
hideLiveWpm();
|
||||
} else {
|
||||
showLiveWpm();
|
||||
}
|
||||
// let wpmstring = wpm < 100 ? ` ${wpm}` : `${wpm}`;
|
||||
document.querySelector("#miniTimerAndLiveWpm .wpm").innerHTML = wpm;
|
||||
document.querySelector("#liveWpm").innerHTML = wpm;
|
||||
let number = wpm;
|
||||
if (config.blindMode) {
|
||||
number = raw;
|
||||
}
|
||||
document.querySelector("#miniTimerAndLiveWpm .wpm").innerHTML = number;
|
||||
document.querySelector("#liveWpm").innerHTML = number;
|
||||
// $("#liveWpm").html(wpm);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue