From 50d3f3ffc00eb75a66b4c266dc28c9a34d1e18ef Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 20 Dec 2023 16:16:38 +0000 Subject: [PATCH] add new loop gui :3 --- css/app.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/css/app.js b/css/app.js index 854f1f34..c616bf92 100644 --- a/css/app.js +++ b/css/app.js @@ -298,14 +298,24 @@ function fetchUrls(urls) { popupMenu.style.display = "none"; } }); - + + var loopedIndicator = document.getElementById("loopedIndicator"); + + loopedIndicator.style.display = "none"; // Initially hide the indicator + loopOption.addEventListener("click", function() { - video.loop = !video.loop; - if (video.loop) { - alert("Looped!"); - } else { - alert("unlooped!") - } + var looped = video.loop; + video.loop = !looped; + + // Update the looped indicator popup + loopedIndicator.textContent = looped ? "Unlooped!" : "Looped!"; + loopedIndicator.style.display = "block"; + + // Hide the indicator after 2 seconds + setTimeout(function() { + loopedIndicator.style.display = "none"; + }, 2000); + }); speedOption.addEventListener("click", function() {