Update script.js
Browse files
script.js
CHANGED
@@ -12,7 +12,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
12 |
|
13 |
function startTest() {
|
14 |
clickCount = 0;
|
15 |
-
clickCounter.textContent = clickCount;
|
16 |
cpsDisplay.textContent = 'CPS: 0.00';
|
17 |
timerElement.textContent = testDuration;
|
18 |
|
@@ -40,8 +40,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
40 |
|
41 |
function recordClick() {
|
42 |
clickCount++;
|
43 |
-
|
44 |
-
clickButton.textContent = clickCount;
|
45 |
updateCPS();
|
46 |
}
|
47 |
|
|
|
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 |
|
41 |
function recordClick() {
|
42 |
clickCount++;
|
43 |
+
clickButton.textContent = clickCount; // Update clickButton with the new click count
|
|
|
44 |
updateCPS();
|
45 |
}
|
46 |
|