From 4a13a2a17cdd8ff09866eeafc657e0684a63152e Mon Sep 17 00:00:00 2001 From: nuttylmao Date: Thu, 5 Jun 2025 10:06:58 +1000 Subject: [PATCH] I don't even know anymore lol --- twitch-ad-countdown-timer/script.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/twitch-ad-countdown-timer/script.js b/twitch-ad-countdown-timer/script.js index 5cbda8f..594aa9b 100644 --- a/twitch-ad-countdown-timer/script.js +++ b/twitch-ad-countdown-timer/script.js @@ -160,11 +160,17 @@ function TwitchAdRun(data) { } function TwitchUpcomingAd(data) { + if (upcomingAdWarningStartDelay != null) + { + console.debug('Countdown already started, skipping...'); + return; + } + // Twitch does not give us ANY data to work with, so we will just // assume each UpcomingAd warning is 5 minutes const warningMinute = 5; - if (!upcomingAdWarningStartDelay) + //if (!upcomingAdWarningStartDelay) upcomingAdWarningStartDelay = warningMinute * 60 - warningSeconds; // Start the countdown animation