removed debug logs and added code that fills in the popup

This commit is contained in:
Miodec 2021-07-05 14:25:23 +01:00
parent 2d71a8f196
commit a38e148a97

View file

@ -1497,8 +1497,6 @@ export function finish(difficultyFailed = false) {
).then((highestwpm) => {
PbCrown.hide();
$("#result .stats .wpm .crown").attr("aria-label", "");
console.log(`crown debug: local pb ${lpb}`);
console.log(`crown debug: local highest wpm ${highestwpm}`);
if (lpb < stats.wpm && stats.wpm < highestwpm) {
dontShowCrown = true;
}
@ -1729,6 +1727,10 @@ export function finish(difficultyFailed = false) {
if (e.data.resultCode === 2) {
//new pb
PbCrown.show();
$("#result .stats .wpm .crown").attr(
"aria-label",
"+" + Misc.roundTo2(pbDiff)
);
DB.saveLocalPB(
Config.mode,
mode2,