add looped easter egg :3

This commit is contained in:
Ashley 2023-12-20 17:29:05 +00:00
parent 75a08f6754
commit c92384e95a

View file

@ -307,14 +307,23 @@ function fetchUrls(urls) {
var looped = video.loop; var looped = video.loop;
video.loop = !looped; video.loop = !looped;
// Update the looped indicator popup // Update the looped indicator popup
var displaySpecialText = Math.random() < 0.5;
// Update the looped indicator popup
if (displaySpecialText) {
var specialText = looped ? "Unlooped >.<" : "Looped~ :3 >~<";
loopedIndicator.textContent = specialText;
} else {
loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!"; loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!";
}
loopedIndicator.style.display = "block"; loopedIndicator.style.display = "block";
// Hide the indicator after 2 seconds // Hide the indicator after 2 seconds
setTimeout(function() { setTimeout(function() {
loopedIndicator.style.display = "none"; loopedIndicator.style.display = "none";
}, 2000); }, 1000);
}); });