File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,7 +207,6 @@ function showWords() {
207207 $ ( "#words" ) . append ( w ) ;
208208 }
209209 } else if ( config . mode == "time" ) {
210- $ ( "#words" ) . css ( "height" , "78px" ) . css ( "overflow" , "hidden" ) ;
211210 for ( let i = 0 ; i < wordsList . length ; i ++ ) {
212211 let w = "<div class='word'>" ;
213212 for ( let c = 0 ; c < wordsList [ i ] . length ; c ++ ) {
@@ -216,6 +215,8 @@ function showWords() {
216215 w += "</div>" ;
217216 $ ( "#words" ) . append ( w ) ;
218217 }
218+ const wordHeight = $ ( $ ( ".word" ) [ 0 ] ) . outerHeight ( ) ;
219+ $ ( "#words" ) . css ( "height" , wordHeight * 3 + 'px' ) . css ( "overflow" , "hidden" ) ;
219220 }
220221 updateActiveElement ( ) ;
221222 updateCaretPosition ( ) ;
@@ -460,7 +461,7 @@ function showResult() {
460461 } ;
461462 console . log ( restartCount ) ;
462463 restartCount = 0 ;
463- if ( stats . wpm > 0 && stats . wpm < 250 && stats . acc > 50 && stats . acc <= 100 ) {
464+ if ( stats . wpm > 0 && stats . wpm < 600 && stats . acc > 50 && stats . acc <= 100 ) {
464465 if ( firebase . auth ( ) . currentUser != null ) {
465466 db_getUserHighestWpm ( config . mode , mode2 ) . then ( data => {
466467 // console.log(`highest wpm for this mode is ${data}, current is ${stats.wpm}`);
Original file line number Diff line number Diff line change @@ -187,6 +187,6 @@ function changeFontSize(fontSize) {
187187 $ ( "#words" ) . addClass ( 'size2' ) ;
188188 $ ( "#caret" ) . addClass ( 'size2' ) ;
189189 }
190- updateCaretPosition ( ) ;
191190 saveConfigToCookie ( ) ;
191+ restartTest ( ) ;
192192}
You can’t perform that action at this time.
0 commit comments