Auto commit: 2026-02-19T22:05:15.956Z

This commit is contained in:
Flatlogic Bot 2026-02-19 22:05:15 +00:00
parent 0a7bcfc414
commit 7d84bb4618

View File

@ -3089,6 +3089,61 @@ $twitter_link = "https://twitter.com/";
}
}
let globalReactionCount = 0;
let lastMassiveCelebration = 0;
let reactionTimer = null;
function triggerMassiveCelebration() {
const duration = 10 * 1000;
const animationEnd = Date.now() + duration;
const defaults = { startVelocity: 30, spread: 360, ticks: 60, zIndex: 10001 };
function randomInRange(min, max) {
return Math.random() * (max - min) + min;
}
const interval = setInterval(function() {
const timeLeft = animationEnd - Date.now();
if (timeLeft <= 0) {
return clearInterval(interval);
}
const particleCount = 40 * (timeLeft / duration);
confetti(Object.assign({}, defaults, { particleCount, origin: { x: randomInRange(0.1, 0.3), y: Math.random() - 0.2 } }));
confetti(Object.assign({}, defaults, { particleCount, origin: { x: randomInRange(0.7, 0.9), y: Math.random() - 0.2 } }));
}, 250);
// Visual feedback text
const banner = document.createElement('div');
banner.style.position = 'fixed';
banner.style.top = '50%';
banner.style.left = '50%';
banner.style.transform = 'translate(-50%, -50%)';
banner.style.zIndex = '10002';
banner.style.textAlign = 'center';
banner.style.pointerEvents = 'none';
banner.style.animation = 'fadeIn 0.5s forwards';
banner.innerHTML = `
<h1 style="font-size: clamp(2rem, 8vw, 5rem); font-weight: 900; color: #facc15; text-shadow: 0 0 30px rgba(250, 204, 21, 0.8); margin: 0; animation: bounce 1s infinite;">¡FIESTA TOTAL!</h1>
<p style="font-size: clamp(1rem, 3vw, 1.5rem); font-weight: 800; color: #fff; text-shadow: 0 0 10px rgba(0,0,0,0.5); text-transform: uppercase; letter-spacing: 2px;">¡LA RADIO ESTÁ EXPLOTANDO! 🔥🎉</p>
`;
document.body.appendChild(banner);
// Play a sound if possible (recycling the DJ power sound)
const powerSound = document.getElementById('dj-power-sound');
if (powerSound) {
powerSound.currentTime = 0;
powerSound.play().catch(() => {});
}
setTimeout(() => {
banner.style.transition = 'opacity 1s ease';
banner.style.opacity = '0';
setTimeout(() => banner.remove(), 1000);
}, 5000);
}
function spawnReactionEmoji(emoji) {
const container = document.body;
const emojiEl = document.createElement('div');
@ -3107,6 +3162,26 @@ $twitter_link = "https://twitter.com/";
container.appendChild(emojiEl);
setTimeout(() => { emojiEl.remove(); }, duration * 1000);
// Massive Celebration Logic
globalReactionCount++;
if (!reactionTimer) {
reactionTimer = setTimeout(() => {
globalReactionCount = 0;
reactionTimer = null;
}, 10000); // 10 second window
}
if (globalReactionCount >= 50 && (Date.now() - lastMassiveCelebration > 30000)) {
triggerMassiveCelebration();
globalReactionCount = 0;
lastMassiveCelebration = Date.now();
if (reactionTimer) {
clearTimeout(reactionTimer);
reactionTimer = null;
}
}
}
async function sendReaction(emoji) {