From c92384e95a8946d129b37d8717b3409c87c33d16 Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 20 Dec 2023 17:29:05 +0000 Subject: [PATCH] add looped easter egg :3 --- css/app.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/css/app.js b/css/app.js index c616bf92..8376a976 100644 --- a/css/app.js +++ b/css/app.js @@ -307,14 +307,23 @@ function fetchUrls(urls) { var looped = video.loop; video.loop = !looped; + // Update the looped indicator popup - loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!"; - loopedIndicator.style.display = "block"; + 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.style.display = "block"; // Hide the indicator after 2 seconds setTimeout(function() { loopedIndicator.style.display = "none"; - }, 2000); + }, 1000); });