mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
removed console.log
added an event for starting the test
This commit is contained in:
parent
db934b36aa
commit
76ab92292a
1 changed files with 9 additions and 5 deletions
|
@ -421,7 +421,7 @@ function showResult() {
|
|||
if (stats.wpm > 0 && stats.wpm < 250 && stats.acc > 50 && stats.acc <= 100) {
|
||||
if (firebase.auth().currentUser != null) {
|
||||
db_getUserHighestWpm(config.mode, mode2).then(data => {
|
||||
console.log(`highest wpm for this mode is ${data}, current is ${stats.wpm}`);
|
||||
// console.log(`highest wpm for this mode is ${data}, current is ${stats.wpm}`);
|
||||
if (data < stats.wpm) {
|
||||
showCrown();
|
||||
}
|
||||
|
@ -621,9 +621,9 @@ function changePage(page) {
|
|||
$('.config').css('opacity', 0);
|
||||
}
|
||||
}
|
||||
firebase.analytics().logEvent('changedPage', {
|
||||
page: page
|
||||
});
|
||||
// firebase.analytics().logEvent('changedPage', {
|
||||
// page: page
|
||||
// });
|
||||
}
|
||||
|
||||
function changeMode(mode) {
|
||||
|
@ -821,6 +821,11 @@ $(document).keypress(function(event) {
|
|||
if (event["keyCode"] == 32) return;
|
||||
//start the test
|
||||
if (currentInput == "" && inputHistory.length == 0) {
|
||||
if (firebase.auth().currentUser != null) {
|
||||
firebase.analytics().logEvent('testStarted');
|
||||
} else {
|
||||
firebase.analytics().logEvent('testStartedNoLogin');
|
||||
}
|
||||
testActive = true;
|
||||
stopCaretAnimation();
|
||||
testStart = Date.now();
|
||||
|
@ -828,7 +833,6 @@ $(document).keypress(function(event) {
|
|||
showTimer();
|
||||
}
|
||||
updateTimerBar();
|
||||
//TODO: #1 Sometimes the timer counts up at double speed for some reason
|
||||
clearIntervals();
|
||||
timers.push(setInterval(function() {
|
||||
time++;
|
||||
|
|
Loading…
Reference in a new issue