Skip to content

Commit

Permalink
Mute only for timer
Browse files Browse the repository at this point in the history
  • Loading branch information
Maysker committed Dec 5, 2023
1 parent f8899b3 commit 7fb2231
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ document.addEventListener('DOMContentLoaded', () => typePhrases(codePhrases));

// Get audio elements and the mute button
var backgroundMusic = document.getElementById('background-music');
var typingSound = document.getElementById('typing-sound');
var muteButton = document.getElementById('mute-button');

// Flag to track the sound state
Expand All @@ -131,7 +130,6 @@ var isMuted = false;
function toggleMute() {
isMuted = !isMuted; // Toggle the flag
backgroundMusic.muted = isMuted; // Enable or disable background music
typingSound.muted = isMuted; // Enable or disable typing sound
muteButton.textContent = isMuted ? "Unmute" : "Mute"; // Update the button text
}

Expand Down

0 comments on commit 7fb2231

Please sign in to comment.