mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-29 11:26:13 +08:00
added punctuation to the database
This commit is contained in:
parent
f7010d70ed
commit
c055f1eaae
2 changed files with 6 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
const db = firebase.firestore();
|
||||
|
||||
function db_testCompleted(wpm, correctChars, incorrectChars, acc, mode, mode2) {
|
||||
function db_testCompleted(wpm, correctChars, incorrectChars, acc, mode, mode2, punctuation) {
|
||||
|
||||
if (wpm > 250 || acc < 50 || acc > 100) return false;
|
||||
|
||||
|
|
@ -17,6 +17,7 @@ function db_testCompleted(wpm, correctChars, incorrectChars, acc, mode, mode2) {
|
|||
acc: acc,
|
||||
mode: mode,
|
||||
mode2: mode2,
|
||||
punctuation: punctuation,
|
||||
timestamp: Date.now()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -472,9 +472,9 @@ var wpmOverTimeChart = new Chart(ctx, {
|
|||
datasets: [{
|
||||
label: "wpm",
|
||||
data: [],
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||
borderColor: 'rgba(255, 99, 132, 1)',
|
||||
borderWidth: 1
|
||||
backgroundColor: 'rgba(255, 255, 255, 0.25',
|
||||
borderColor: 'rgba(255, 255, 255, 1)',
|
||||
borderWidth: 2
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
|
|
@ -538,7 +538,7 @@ function showResult2() {
|
|||
if (data.wpm < stats.wpm || data == false) {
|
||||
$("#result .stats .wpm .top").append('<div class="crown"><i class="fas fa-crown"></i></div>');
|
||||
}
|
||||
db_testCompleted(stats.wpm, stats.correctChars, stats.incorrectChars, stats.acc, config.mode, mode2);
|
||||
db_testCompleted(stats.wpm, stats.correctChars, stats.incorrectChars, stats.acc, config.mode, mode2, config.punctuation);
|
||||
})
|
||||
} else {
|
||||
alert('test invalid');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue