diff --git a/public/js/db.js b/public/js/db.js index a2299487d..299af4f7c 100644 --- a/public/js/db.js +++ b/public/js/db.js @@ -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() }) } diff --git a/public/js/script.js b/public/js/script.js index a9b6b8b06..00da8dfb2 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -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('
'); } - 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');