Auto commit: 2026-02-18T22:18:18.630Z
This commit is contained in:
parent
69c8c87fc6
commit
b2da37aaa1
39
index.php
39
index.php
@ -1822,9 +1822,14 @@ $twitter_link = "https://twitter.com/";
|
|||||||
<section class="interaction-center">
|
<section class="interaction-center">
|
||||||
<!-- Live Web Chat -->
|
<!-- Live Web Chat -->
|
||||||
<div class="glass-card chat-window" style="height: 500px; display: flex; flex-direction: column;">
|
<div class="glass-card chat-window" style="height: 500px; display: flex; flex-direction: column;">
|
||||||
<h3 style="font-size: 1.2rem; margin-bottom: 1rem; color: var(--primary-color);">
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;">
|
||||||
<i class="bi bi-chat-dots-fill"></i> CHAT EN VIVO
|
<h3 style="font-size: 1.2rem; margin: 0; color: var(--primary-color);">
|
||||||
</h3>
|
<i class="bi bi-chat-dots-fill"></i> CHAT EN VIVO
|
||||||
|
</h3>
|
||||||
|
<button id="mute-chat-btn" onclick="toggleChatSound()" style="background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s;" title="Silenciar/Activar sonido del chat">
|
||||||
|
<i class="bi bi-volume-up-fill"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div id="pinned-message" class="pinned-message-container">
|
<div id="pinned-message" class="pinned-message-container">
|
||||||
<div class="pinned-label"><i class="bi bi-pin-angle-fill"></i> MENSAJE FIJADO</div>
|
<div class="pinned-label"><i class="bi bi-pin-angle-fill"></i> MENSAJE FIJADO</div>
|
||||||
<div id="pinned-content" style="font-size: 0.85rem; font-weight: 600;"></div>
|
<div id="pinned-content" style="font-size: 0.85rem; font-weight: 600;"></div>
|
||||||
@ -2502,6 +2507,31 @@ $twitter_link = "https://twitter.com/";
|
|||||||
const chatMsg = document.getElementById('chat-msg');
|
const chatMsg = document.getElementById('chat-msg');
|
||||||
const emojiPicker = document.getElementById('emoji-picker');
|
const emojiPicker = document.getElementById('emoji-picker');
|
||||||
let lastMessageCount = 0;
|
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() {
|
function toggleEmojiPicker() {
|
||||||
emojiPicker.style.display = emojiPicker.style.display === 'none' ? 'block' : 'none';
|
emojiPicker.style.display = emojiPicker.style.display === 'none' ? 'block' : 'none';
|
||||||
@ -2554,10 +2584,11 @@ $twitter_link = "https://twitter.com/";
|
|||||||
if (messages.length === lastMessageCount) return;
|
if (messages.length === lastMessageCount) return;
|
||||||
|
|
||||||
// Play pop sound for new messages (not on initial load)
|
// 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');
|
const popSound = document.getElementById('pop-sound');
|
||||||
if (popSound) {
|
if (popSound) {
|
||||||
popSound.currentTime = 0;
|
popSound.currentTime = 0;
|
||||||
|
popSound.volume = 0.4; // Soft volume
|
||||||
popSound.play().catch(e => console.log('Pop sound blocked:', e));
|
popSound.play().catch(e => console.log('Pop sound blocked:', e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user