Skip to content

Commit

Permalink
Remove audio
Browse files Browse the repository at this point in the history
  • Loading branch information
v-zmiycharov committed Oct 21, 2024
1 parent 86d3996 commit 3bb5bce
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# softuni-ai-timer
SoftUni AI Timer
3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ <h1>Exclusive partner:</h1>
</section>
</div>
</div>
<audio loop>
<source src="./public/melody.mp3" type="audio/mp3">
</audio>
<script type="module" src="./scripts/index.js"></script>
</body>

Expand Down
Binary file removed public/melody.mp3
Binary file not shown.
4 changes: 0 additions & 4 deletions scripts/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,5 @@ export const elements = {
closeButton: () => document.querySelector('#close-button'),
form: () => document.querySelector('form.time-form'),
suggestions: () => document.querySelector('.suggestions')
},
audio: {
audio: () => document.querySelector('audio'),
muteButton: () => document.querySelector('header')
}
};
10 changes: 0 additions & 10 deletions scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ export function formatTimeContent(value) {
return Number(value).toString().padStart(2, 0);
};

export function manageAudio() {
const isPaused = elements.audio.audio().paused;
if (isPaused) {
elements.audio.audio().play();
} else {
elements.audio.audio().pause();
}
};

export function getMinutesToSet() {
const currentMinutes = new Date().getMinutes();
const currentHalf = Number(currentMinutes) >= 30 ? 60 : 30;
Expand All @@ -67,7 +58,6 @@ export function setupEvents() {
elements.time.minutes().addEventListener('wheel', timeHandlers.minutes);
elements.time.seconds().addEventListener('wheel', timeHandlers.seconds);
// elements.info.timerState().addEventListener('click', controlCenter);
elements.audio.muteButton().addEventListener('click', manageAudio);
};

export function appendPartnersElements() {
Expand Down

0 comments on commit 3bb5bce

Please sign in to comment.