mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-08 22:50:00 +08:00
mode sure custom results can be saved
not showing pb line if value is 0
This commit is contained in:
parent
9efd938b74
commit
197e413014
1 changed files with 9 additions and 5 deletions
|
@ -714,13 +714,15 @@ function showResult(difficultyFailed = false) {
|
|||
});
|
||||
|
||||
let mode2 = "";
|
||||
if (config.mode == "time") {
|
||||
if (config.mode === "time") {
|
||||
mode2 = config.time;
|
||||
// $("#result .stats .time").addClass('hidden');
|
||||
} else if (config.mode == "words") {
|
||||
} else if (config.mode === "words") {
|
||||
mode2 = config.words;
|
||||
// $("#result .stats .time").removeClass('hidden');
|
||||
// $("#result .stats .time .bottom").text(roundedToFixed(stats.time,1)+'s');
|
||||
} else if (config.mode === "custom"){
|
||||
mode2 = "custom";
|
||||
}
|
||||
|
||||
|
||||
|
@ -794,9 +796,11 @@ function showResult(difficultyFailed = false) {
|
|||
}
|
||||
localPb = true;
|
||||
}
|
||||
wpmOverTimeChart.options.annotation.annotations[0].value = d2;
|
||||
wpmOverTimeChart.options.annotation.annotations[0].label.content = "PB: "+ d2;
|
||||
wpmOverTimeChart.update();
|
||||
if(d2 > 0){
|
||||
wpmOverTimeChart.options.annotation.annotations[0].value = d2;
|
||||
wpmOverTimeChart.options.annotation.annotations[0].label.content = "PB: "+ d2;
|
||||
wpmOverTimeChart.update();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue