We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f428ea4 commit 49e3de8Copy full SHA for 49e3de8
1 file changed
public/js/script.js
@@ -424,18 +424,26 @@ function calculateStats() {
424
}
425
426
function hideCrown() {
427
- $("#result .stats .wpm .crownWrapper").css('width', 0);
+ $("#result .stats .wpm .crownWrapper").css('opacity', 0);
428
429
430
function showCrown() {
431
$("#result .stats .wpm .crownWrapper").animate({
432
- width: '1.7rem'
433
- }, 250);
+ opacity: 1
+ }, 250,"easeOutCubic");
434
435
436
function showResult() {
437
testEnd = Date.now();
438
let stats = calculateStats();
439
+ if(stats === undefined){
440
+ stats = {
441
+ wpm: 0,
442
+ acc: 0,
443
+ correctChars: 0,
444
+ incorrectChars: 0
445
+ }
446
447
clearIntervals();
448
$("#result .stats .wpm .bottom").text(stats.wpm);
449
$("#result .stats .acc .bottom").text(stats.acc + "%");
0 commit comments