Update script.js
Browse files
script.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
| 2 |
|
| 3 |
document.addEventListener('DOMContentLoaded', () => {
|
| 4 |
const clickButton = document.getElementById('clickButton');
|
| 5 |
-
const clickCounter = document.getElementById('clickCounter');
|
| 6 |
const cpsDisplay = document.getElementById('cpsDisplay');
|
| 7 |
const timerElement = document.getElementById('timer');
|
| 8 |
|
|
@@ -12,7 +11,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
| 12 |
|
| 13 |
function startTest() {
|
| 14 |
clickCount = 0;
|
| 15 |
-
clickCounter.textContent = clickCount; // Initialize clickCounter to 0
|
| 16 |
cpsDisplay.textContent = 'CPS: 0.00';
|
| 17 |
timerElement.textContent = testDuration;
|
| 18 |
|
|
@@ -40,7 +38,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
| 40 |
|
| 41 |
function recordClick() {
|
| 42 |
clickCount++;
|
| 43 |
-
clickButton.textContent = clickCount; // Update
|
| 44 |
updateCPS();
|
| 45 |
}
|
| 46 |
|
|
|
|
| 2 |
|
| 3 |
document.addEventListener('DOMContentLoaded', () => {
|
| 4 |
const clickButton = document.getElementById('clickButton');
|
|
|
|
| 5 |
const cpsDisplay = document.getElementById('cpsDisplay');
|
| 6 |
const timerElement = document.getElementById('timer');
|
| 7 |
|
|
|
|
| 11 |
|
| 12 |
function startTest() {
|
| 13 |
clickCount = 0;
|
|
|
|
| 14 |
cpsDisplay.textContent = 'CPS: 0.00';
|
| 15 |
timerElement.textContent = testDuration;
|
| 16 |
|
|
|
|
| 38 |
|
| 39 |
function recordClick() {
|
| 40 |
clickCount++;
|
| 41 |
+
clickButton.textContent = clickCount; // Update button with the new click count
|
| 42 |
updateCPS();
|
| 43 |
}
|
| 44 |
|