Fix full video label sometimes not appearing when you open a video in a background tab

This commit is contained in:
Ajay
2024-11-27 23:54:09 -05:00
parent 14f8ee565a
commit cfa8eee193
3 changed files with 9 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ export class CategoryPill {
}
private async attachToPageInternal(): Promise<void> {
let referenceNode =
let referenceNode =
await waitFor(() => getYouTubeTitleNode());
// Experimental YouTube layout with description on right
@@ -119,6 +119,8 @@ export class CategoryPill {
}
async setSegment(segment: SponsorTime): Promise<void> {
await waitFor(() => this.ref.current);
if (this.ref.current?.state?.segment !== segment) {
const newState = {
segment,