mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 12:37:05 +03:00
Hide YouTube chapters from popup
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import Config from "./config";
|
import Config from "./config";
|
||||||
|
|
||||||
import Utils from "./utils";
|
import Utils from "./utils";
|
||||||
import { SponsorTime, SponsorHideType, ActionType, SegmentUUID } from "./types";
|
import { SponsorTime, SponsorHideType, ActionType, SegmentUUID, SponsorSourceType } from "./types";
|
||||||
import { Message, MessageResponse, IsInfoFoundMessageResponse } from "./messageTypes";
|
import { Message, MessageResponse, IsInfoFoundMessageResponse } from "./messageTypes";
|
||||||
import { showDonationLink } from "./utils/configUtils";
|
import { showDonationLink } from "./utils/configUtils";
|
||||||
import { AnimationUtils } from "./utils/animationUtils";
|
import { AnimationUtils } from "./utils/animationUtils";
|
||||||
@@ -432,7 +432,8 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
if (currentSegmentTab === SegmentTab.Segments) {
|
if (currentSegmentTab === SegmentTab.Segments) {
|
||||||
return segment.actionType !== ActionType.Chapter;
|
return segment.actionType !== ActionType.Chapter;
|
||||||
} else if (currentSegmentTab === SegmentTab.Chapters) {
|
} else if (currentSegmentTab === SegmentTab.Chapters) {
|
||||||
return segment.actionType === ActionType.Chapter;
|
return segment.actionType === ActionType.Chapter
|
||||||
|
&& segment.source !== SponsorSourceType.YouTube;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user