mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-07 22:23:45 +08:00
changed the animation of the crown icon
This commit is contained in:
parent
f428ea4007
commit
49e3de8b38
1 changed files with 11 additions and 3 deletions
|
@ -424,18 +424,26 @@ function calculateStats() {
|
|||
}
|
||||
|
||||
function hideCrown() {
|
||||
$("#result .stats .wpm .crownWrapper").css('width', 0);
|
||||
$("#result .stats .wpm .crownWrapper").css('opacity', 0);
|
||||
}
|
||||
|
||||
function showCrown() {
|
||||
$("#result .stats .wpm .crownWrapper").animate({
|
||||
width: '1.7rem'
|
||||
}, 250);
|
||||
opacity: 1
|
||||
}, 250,"easeOutCubic");
|
||||
}
|
||||
|
||||
function showResult() {
|
||||
testEnd = Date.now();
|
||||
let stats = calculateStats();
|
||||
if(stats === undefined){
|
||||
stats = {
|
||||
wpm: 0,
|
||||
acc: 0,
|
||||
correctChars: 0,
|
||||
incorrectChars: 0
|
||||
}
|
||||
}
|
||||
clearIntervals();
|
||||
$("#result .stats .wpm .bottom").text(stats.wpm);
|
||||
$("#result .stats .acc .bottom").text(stats.acc + "%");
|
||||
|
|
Loading…
Add table
Reference in a new issue