mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
Default to chapters tab if no normal segments
This commit is contained in:
@@ -504,9 +504,15 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
||||
if (!sponsorTimes.some((segment) => segment.actionType === ActionType.Chapter && segment.source !== SponsorSourceType.YouTube)) {
|
||||
PageElements.issueReporterTabs.classList.add("hidden");
|
||||
currentSegmentTab = SegmentTab.Segments;
|
||||
} else {
|
||||
if (currentSegmentTab === SegmentTab.Segments
|
||||
&& sponsorTimes.every((segment) => segment.actionType === ActionType.Chapter)) {
|
||||
PageElements.issueReporterTabs.classList.add("hidden");
|
||||
currentSegmentTab = SegmentTab.Chapters;
|
||||
} else {
|
||||
PageElements.issueReporterTabs.classList.remove("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
// Sort list by start time
|
||||
const downloadedTimes = sponsorTimes
|
||||
|
||||
Reference in New Issue
Block a user