mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Don't draw chapters bar when no custom segments
This commit is contained in:
parent
4cb6baaff0
commit
b1ef8a5d47
1 changed files with 3 additions and 2 deletions
|
@ -258,9 +258,10 @@ class PreviewBar {
|
|||
const chapterBar = document.querySelector(".ytp-chapters-container:not(.sponsorBlockChapterBar)") as HTMLElement;
|
||||
if (!progressBar || !chapterBar || chapterBar.childElementCount <= 0) return;
|
||||
|
||||
if (!Config.config.renderSegmentsAsChapters
|
||||
if (segments.every((segments) => segments.source === SponsorSourceType.YouTube)
|
||||
|| (!Config.config.renderSegmentsAsChapters
|
||||
&& segments.every((segment) => segment.actionType !== ActionType.Chapter
|
||||
|| segment.source === SponsorSourceType.YouTube)) {
|
||||
|| segment.source === SponsorSourceType.YouTube))) {
|
||||
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
||||
chapterBar.style.removeProperty("display");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue