mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +03:00
@@ -259,6 +259,11 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
|
||||
utils.getSponsorTimeFromUUID(sponsorTimes, request.UUID).hidden = request.type;
|
||||
utils.addHiddenSegment(sponsorVideoID, request.UUID, request.type);
|
||||
updatePreviewBar();
|
||||
|
||||
if (skipButtonControlBar?.isEnabled()
|
||||
&& sponsorTimesSubmitting.every((s) => s.hidden !== SponsorHideType.Visible || s.actionType !== ActionType.Poi)) {
|
||||
skipButtonControlBar.disable();
|
||||
}
|
||||
break;
|
||||
case "closePopup":
|
||||
closeInfoMenu();
|
||||
@@ -1229,7 +1234,8 @@ function startSkipScheduleCheckingForStartSponsors() {
|
||||
|
||||
// For highlight category
|
||||
const poiSegments = sponsorTimes
|
||||
.filter((time) => time.segment[1] > video.currentTime && time.actionType === ActionType.Poi)
|
||||
.filter((time) => time.segment[1] > video.currentTime
|
||||
&& time.actionType === ActionType.Poi && time.hidden === SponsorHideType.Visible)
|
||||
.sort((a, b) => b.segment[0] - a.segment[0]);
|
||||
for (const time of poiSegments) {
|
||||
const skipOption = utils.getCategorySelection(time.category)?.option;
|
||||
|
||||
@@ -142,6 +142,10 @@ export class SkipButtonControlBar {
|
||||
this.enabled = false;
|
||||
}
|
||||
|
||||
isEnabled(): boolean {
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
toggleSkip(): void {
|
||||
this.skip(this.segment);
|
||||
this.disableText();
|
||||
|
||||
@@ -698,6 +698,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
voteButtonsContainer.appendChild(downvoteButton);
|
||||
voteButtonsContainer.appendChild(uuidButton);
|
||||
if (downloadedTimes[i].actionType === ActionType.Skip || downloadedTimes[i].actionType === ActionType.Mute
|
||||
|| downloadedTimes[i].actionType === ActionType.Poi
|
||||
&& [SponsorHideType.Visible, SponsorHideType.Hidden].includes(downloadedTimes[i].hidden)) {
|
||||
voteButtonsContainer.appendChild(hideButton);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user