From 7cb7f237482025a9f9de44d59e18b8a5c7a8fe06 Mon Sep 17 00:00:00 2001 From: Wish <100239673+wish13yt@users.noreply.github.com> Date: Sun, 20 Oct 2024 10:40:47 -0500 Subject: [PATCH] Update index.js --- js/index.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/js/index.js b/js/index.js index 1e8b67f..2eb6eff 100644 --- a/js/index.js +++ b/js/index.js @@ -1,7 +1,6 @@ const popup = document.getElementById('sound-popup'); const thanksButton = document.getElementById('thanks-button'); const thanksSound = document.getElementById('thanks-sound'); -const backgroundMusic = document.getElementById('background-music'); const muteButton = document.getElementById('mute-button'); const githubButton = document.getElementById('github-button'); const discordButton = document.getElementById('discord-button'); @@ -21,22 +20,9 @@ thanksButton.addEventListener('click', () => { muteButton.style.display = 'block'; pikidiaryButton.style.display = 'block'; freakyblog.style.display = 'block'; - backgroundMusic.play(); }, 2000); }); -function toggleMusic() { - if (backgroundMusic.paused) { - backgroundMusic.play(); - muteButton.textContent = 'Mute Music'; - } else { - backgroundMusic.pause(); - muteButton.textContent = 'Unmute Music'; - } -} - -muteButton.addEventListener('click', toggleMusic); - window.addEventListener('load', () => { setTimeout(() => popup.style.display = 'flex', 500); }); @@ -293,16 +279,3 @@ if (translations.hasOwnProperty(lang)) { updateLanguage('en'); }); -document.addEventListener("DOMContentLoaded", function() { - var myAudio = document.getElementById('background-music'); - -if (myAudio.duration > 0 && !myAudio.paused) { - -element = document.getElementById('sound-popup') -element.delete(); - -} else { - -//Not playing...maybe paused, stopped or never played. - -}})