File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ function hideCrown() {
430430}
431431
432432function showCrown ( ) {
433- $ ( "#result .stats .wpm .crownWrapper" ) . animate ( {
433+ $ ( "#result .stats .wpm .crownWrapper" ) . delay ( 275 ) . animate ( {
434434 opacity : 1
435435 } , 250 , "easeOutCubic" ) ;
436436}
@@ -456,7 +456,7 @@ function showResult() {
456456 } else if ( config . mode == "words" ) {
457457 mode2 = config . words ;
458458 }
459- hideCrown ( ) ;
459+
460460 let completedEvent = {
461461 wpm : stats . wpm ,
462462 correctChars : stats . correctChars ,
@@ -476,6 +476,7 @@ function showResult() {
476476 db_getUserHighestWpm ( config . mode , mode2 , config . punctuation , config . language ) . then ( data => {
477477 // console.log(`highest wpm for this mode is ${data}, current is ${stats.wpm}`);
478478 if ( data < stats . wpm ) {
479+ hideCrown ( ) ;
479480 showCrown ( ) ;
480481 }
481482 completedEvent . uid = firebase . auth ( ) . currentUser . uid ;
@@ -574,6 +575,7 @@ function restartTest() {
574575 $ ( "#words" ) . css ( 'opacity' , 0 ) . removeClass ( 'hidden' ) . stop ( true , true ) . animate ( {
575576 opacity : 1
576577 } , 125 , ( ) => {
578+ hideCrown ( ) ;
577579 clearIntervals ( ) ;
578580 $ ( "#restartTestButton" ) . css ( 'opacity' , 1 ) ;
579581 if ( $ ( "#commandLineWrapper" ) . hasClass ( 'hidden' ) ) focusWords ( ) ;
You can’t perform that action at this time.
0 commit comments