Skip to content

Commit

Permalink
Remove unnecessary counter and update button position
Browse files Browse the repository at this point in the history
  • Loading branch information
maxiwee69 committed Jan 30, 2024
1 parent 5f5ad7b commit 06d97b6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ window.onload = function() {
button.style.top = y+'px';
}

let counter = 0; // Initialize the counter

document.getElementById('invisblebutton').addEventListener('click', function() {
var secretImage = document.getElementById('secretImage');
if (secretImage.style.display === 'block') {
Expand All @@ -35,8 +33,5 @@ document.getElementById('invisblebutton').addEventListener('click', function() {
secretImage.style.position = "absolute";
secretImage.style.left = x+'px';
secretImage.style.top = y+'px';

counter++; // Increment the counter
document.getElementById('counter').textContent = counter + ' people have found the secret'; // Update the counter on the website
}
});

0 comments on commit 06d97b6

Please sign in to comment.