mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Hide chapter chevron when it won't do anything
This commit is contained in:
parent
7badfd9b32
commit
de85d93602
1 changed files with 8 additions and 1 deletions
|
@ -217,7 +217,14 @@ class PreviewBar {
|
|||
this.container.appendChild(bar);
|
||||
}
|
||||
|
||||
this.createChaptersBar(segments.sort((a, b) => a.segment[0] - b.segment[0]))
|
||||
this.createChaptersBar(segments.sort((a, b) => a.segment[0] - b.segment[0]));
|
||||
|
||||
const chapterChevron = document.querySelector(".ytp-chapter-title-chevron") as HTMLElement;
|
||||
if (!Config.config.renderAsChapters || segments.some((segment) => segment.source === SponsorSourceType.YouTube)) {
|
||||
chapterChevron.style.removeProperty("display");
|
||||
} else {
|
||||
chapterChevron.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
createBar(barSegment: PreviewBarSegment): HTMLLIElement {
|
||||
|
|
Loading…
Reference in a new issue