mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-03 20:40:48 +08:00
fixed a bug where the live wpm would be hidden if the first word is not completed within the first second
This commit is contained in:
parent
5aaf05cc43
commit
6e4fe37bf5
1 changed files with 6 additions and 1 deletions
|
@ -1794,7 +1794,11 @@ function liveWpmAndRaw() {
|
|||
|
||||
function updateLiveWpm(wpm) {
|
||||
if (!config.showLiveWpm) return;
|
||||
if (wpm == 0 || !testActive) hideLiveWpm();
|
||||
if (!testActive) {
|
||||
hideLiveWpm();
|
||||
} else {
|
||||
showLiveWpm();
|
||||
}
|
||||
// let wpmstring = wpm < 100 ? ` ${wpm}` : `${wpm}`;
|
||||
document.querySelector("#liveWpm").innerHTML = wpm;
|
||||
// $("#liveWpm").html(wpm);
|
||||
|
@ -1810,6 +1814,7 @@ function showLiveWpm() {
|
|||
}
|
||||
|
||||
function hideLiveWpm() {
|
||||
console.log("hiding");
|
||||
$("#liveWpm").css("opacity", 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue