From 4f845a0c5afe3346a20c3465f717a9306b495446 Mon Sep 17 00:00:00 2001 From: mileswa1q22 Date: Mon, 14 Apr 2025 13:26:09 +0000 Subject: [PATCH] yes --- WebGames-master/WebGames-master/index.html | 22 ++++++++++++++++++ index.html | 25 +++++++++++++++++++++ setting.html | 25 +++++++++++++++++++++ videoplayback.mp3 | Bin 0 -> 1913915 bytes 4 files changed, 72 insertions(+) create mode 100644 videoplayback.mp3 diff --git a/WebGames-master/WebGames-master/index.html b/WebGames-master/WebGames-master/index.html index d42df5b0..a6bedc08 100644 --- a/WebGames-master/WebGames-master/index.html +++ b/WebGames-master/WebGames-master/index.html @@ -919,6 +919,28 @@ }); } }; + + // Check if music is enabled + const musicEnabled = getCookie('backgroundMusic') === 'true'; + const backgroundMusic = document.getElementById('backgroundMusic'); + + if (musicEnabled) { + backgroundMusic.volume = 0.5; // Set volume to 50% + backgroundMusic.play(); // Play the music + } else { + backgroundMusic.pause(); // Pause the music + } + + // Function to toggle music + function toggleMusic() { + const musicEnabled = getCookie('backgroundMusic') === 'true'; + setCookie('backgroundMusic', !musicEnabled, 30); // Toggle music state + if (!musicEnabled) { + backgroundMusic.play(); + } else { + backgroundMusic.pause(); + } + } \ No newline at end of file diff --git a/index.html b/index.html index ac97cd21..a72672e6 100644 --- a/index.html +++ b/index.html @@ -119,6 +119,9 @@
+ + +