From b2da37aaa12f8cd877f944ce6e9bf1dc0c12e4e2 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 18 Feb 2026 22:18:18 +0000 Subject: [PATCH] Auto commit: 2026-02-18T22:18:18.630Z --- index.php | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index bf73d7c..4aa8440 100644 --- a/index.php +++ b/index.php @@ -1822,9 +1822,14 @@ $twitter_link = "https://twitter.com/";
-

- CHAT EN VIVO -

+
+

+ CHAT EN VIVO +

+ +
MENSAJE FIJADO
@@ -2502,6 +2507,31 @@ $twitter_link = "https://twitter.com/"; const chatMsg = document.getElementById('chat-msg'); const emojiPicker = document.getElementById('emoji-picker'); let lastMessageCount = 0; + let chatSoundMuted = localStorage.getItem('chatSoundMuted') === 'true'; + + function updateMuteButton() { + const btn = document.getElementById('mute-chat-btn'); + if (!btn) return; + const icon = btn.querySelector('i'); + if (chatSoundMuted) { + icon.classList.remove('bi-volume-up-fill'); + icon.classList.add('bi-volume-mute-fill'); + btn.style.color = '#ff4444'; + } else { + icon.classList.remove('bi-volume-mute-fill'); + icon.classList.add('bi-volume-up-fill'); + btn.style.color = 'white'; + } + } + + function toggleChatSound() { + chatSoundMuted = !chatSoundMuted; + localStorage.setItem('chatSoundMuted', chatSoundMuted); + updateMuteButton(); + } + + // Initialize button state + setTimeout(updateMuteButton, 500); function toggleEmojiPicker() { emojiPicker.style.display = emojiPicker.style.display === 'none' ? 'block' : 'none'; @@ -2554,10 +2584,11 @@ $twitter_link = "https://twitter.com/"; if (messages.length === lastMessageCount) return; // Play pop sound for new messages (not on initial load) - if (messages.length > lastMessageCount && lastMessageCount > 0) { + if (!chatSoundMuted && messages.length > lastMessageCount && lastMessageCount > 0) { const popSound = document.getElementById('pop-sound'); if (popSound) { popSound.currentTime = 0; + popSound.volume = 0.4; // Soft volume popSound.play().catch(e => console.log('Pop sound blocked:', e)); } }