mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Merge pull request #1627 from mchangrh/partialRequredSegment
highlight partial required segments
This commit is contained in:
commit
b9b43513b4
1 changed files with 2 additions and 1 deletions
|
@ -1421,6 +1421,7 @@ function updatePreviewBar(): void {
|
||||||
if (video === null) return;
|
if (video === null) return;
|
||||||
|
|
||||||
const hashParams = getHashParams();
|
const hashParams = getHashParams();
|
||||||
|
const requiredSegment = hashParams?.requiredSegment as SegmentUUID || undefined;
|
||||||
const previewBarSegments: PreviewBarSegment[] = [];
|
const previewBarSegments: PreviewBarSegment[] = [];
|
||||||
if (sponsorTimes) {
|
if (sponsorTimes) {
|
||||||
sponsorTimes.forEach((segment) => {
|
sponsorTimes.forEach((segment) => {
|
||||||
|
@ -1434,7 +1435,7 @@ function updatePreviewBar(): void {
|
||||||
showLarger: segment.actionType === ActionType.Poi,
|
showLarger: segment.actionType === ActionType.Poi,
|
||||||
description: segment.description,
|
description: segment.description,
|
||||||
source: segment.source,
|
source: segment.source,
|
||||||
requiredSegment: hashParams.requiredSegment && segment.UUID === hashParams.requiredSegment
|
requiredSegment: requiredSegment && (segment.UUID === requiredSegment || segment.UUID.startsWith(requiredSegment))
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue