From 634e2490f3d410664d3837f26a4ccf2aa73f95cc Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 18 Sep 2025 04:01:24 -0400 Subject: [PATCH] Fix live chat messing with skip profile ui --- src/content.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/content.ts b/src/content.ts index f8c4c860..92c87f2a 100644 --- a/src/content.ts +++ b/src/content.ts @@ -147,8 +147,6 @@ let lastCheckVideoTime = -1; // To determine if a video resolution change is happening let firstPlay = true; -let channelWhitelisted = false; - let previewBar: PreviewBar = null; // Skip to highlight button let skipButtonControlBar: SkipButtonControlBar = null; @@ -245,11 +243,6 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo isYTTV: (document.location.host === "tv.youtube.com") }); - break; - case "whitelistChange": - channelWhitelisted = request.value; - sponsorsLookup(); - break; case "submitTimes": openSubmissionMenu(); @@ -402,12 +395,14 @@ function contentLocalConfigUpdateListener(changes: StorageChangesObject) { } } -if (!Config.configSyncListeners.includes(contentConfigUpdateListener)) { - Config.configSyncListeners.push(contentConfigUpdateListener); -} +if (!window.location.href.includes("youtube.com/live_chat")) { + if (!Config.configSyncListeners.includes(contentConfigUpdateListener)) { + Config.configSyncListeners.push(contentConfigUpdateListener); + } -if (!Config.configLocalListeners.includes(contentLocalConfigUpdateListener)) { - Config.configLocalListeners.push(contentLocalConfigUpdateListener); + if (!Config.configLocalListeners.includes(contentLocalConfigUpdateListener)) { + Config.configLocalListeners.push(contentLocalConfigUpdateListener); + } } function resetValues() { @@ -424,7 +419,6 @@ function resetValues() { shownSegmentFailedToFetchWarning = false; videoInfo = null; - channelWhitelisted = false; lockedCategories = []; //empty the preview bar @@ -704,7 +698,7 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current logDebug(`Ready to start skipping: ${skipInfo.index} at ${currentTime}`); if (skipInfo.index === -1) return; - if (Config.config.disableSkipping || channelWhitelisted || (getChannelIDInfo().status === ChannelIDStatus.Fetching && Config.config.forceChannelCheck)){ + if (Config.config.disableSkipping || (getChannelIDInfo().status === ChannelIDStatus.Fetching && Config.config.forceChannelCheck)){ return; }