Fix live chat messing with skip profile ui

This commit is contained in:
Ajay
2025-09-18 04:01:24 -04:00
parent 6d884fee62
commit 634e2490f3

View File

@@ -147,8 +147,6 @@ let lastCheckVideoTime = -1;
// To determine if a video resolution change is happening // To determine if a video resolution change is happening
let firstPlay = true; let firstPlay = true;
let channelWhitelisted = false;
let previewBar: PreviewBar = null; let previewBar: PreviewBar = null;
// Skip to highlight button // Skip to highlight button
let skipButtonControlBar: SkipButtonControlBar = null; let skipButtonControlBar: SkipButtonControlBar = null;
@@ -245,11 +243,6 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
isYTTV: (document.location.host === "tv.youtube.com") isYTTV: (document.location.host === "tv.youtube.com")
}); });
break;
case "whitelistChange":
channelWhitelisted = request.value;
sponsorsLookup();
break; break;
case "submitTimes": case "submitTimes":
openSubmissionMenu(); openSubmissionMenu();
@@ -402,12 +395,14 @@ function contentLocalConfigUpdateListener(changes: StorageChangesObject) {
} }
} }
if (!Config.configSyncListeners.includes(contentConfigUpdateListener)) { if (!window.location.href.includes("youtube.com/live_chat")) {
Config.configSyncListeners.push(contentConfigUpdateListener); if (!Config.configSyncListeners.includes(contentConfigUpdateListener)) {
} Config.configSyncListeners.push(contentConfigUpdateListener);
}
if (!Config.configLocalListeners.includes(contentLocalConfigUpdateListener)) { if (!Config.configLocalListeners.includes(contentLocalConfigUpdateListener)) {
Config.configLocalListeners.push(contentLocalConfigUpdateListener); Config.configLocalListeners.push(contentLocalConfigUpdateListener);
}
} }
function resetValues() { function resetValues() {
@@ -424,7 +419,6 @@ function resetValues() {
shownSegmentFailedToFetchWarning = false; shownSegmentFailedToFetchWarning = false;
videoInfo = null; videoInfo = null;
channelWhitelisted = false;
lockedCategories = []; lockedCategories = [];
//empty the preview bar //empty the preview bar
@@ -704,7 +698,7 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current
logDebug(`Ready to start skipping: ${skipInfo.index} at ${currentTime}`); logDebug(`Ready to start skipping: ${skipInfo.index} at ${currentTime}`);
if (skipInfo.index === -1) return; 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; return;
} }