mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 22:47:18 +03:00
highlight partial required segments
This commit is contained in:
@@ -1421,6 +1421,7 @@ function updatePreviewBar(): void {
|
||||
if (video === null) return;
|
||||
|
||||
const hashParams = getHashParams();
|
||||
const requiredSegment = hashParams?.requiredSegment as SegmentUUID || undefined;
|
||||
const previewBarSegments: PreviewBarSegment[] = [];
|
||||
if (sponsorTimes) {
|
||||
sponsorTimes.forEach((segment) => {
|
||||
@@ -1434,7 +1435,7 @@ function updatePreviewBar(): void {
|
||||
showLarger: segment.actionType === ActionType.Poi,
|
||||
description: segment.description,
|
||||
source: segment.source,
|
||||
requiredSegment: hashParams.requiredSegment && segment.UUID === hashParams.requiredSegment
|
||||
requiredSegment: requiredSegment && segment.UUID === requiredSegment || segment.UUID.startsWith(requiredSegment)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user