Sergidev commited on
Commit
ee1b5be
·
verified ·
1 Parent(s): 26a9e05

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +1 -3
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 clickButton with the new click count
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