mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
Add title element for category pill on updated youtube
This commit is contained in:
@@ -23,8 +23,8 @@ export class CategoryPill {
|
|||||||
vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise<VoteResponse>): Promise<void> {
|
vote: (type: number, UUID: SegmentUUID, category?: Category) => Promise<VoteResponse>): Promise<void> {
|
||||||
const referenceNode =
|
const referenceNode =
|
||||||
await GenericUtils.wait(() =>
|
await GenericUtils.wait(() =>
|
||||||
// YouTube, Mobile YouTube, Invidious
|
// New YouTube Title, YouTube, Mobile YouTube, Invidious
|
||||||
document.querySelector(".ytd-video-primary-info-renderer.title, .slim-video-information-title, #player-container + .h-box > h1") as HTMLElement);
|
document.querySelector("#title h1, .ytd-video-primary-info-renderer.title, .slim-video-information-title, #player-container + .h-box > h1") as HTMLElement);
|
||||||
|
|
||||||
if (referenceNode && !referenceNode.contains(this.container)) {
|
if (referenceNode && !referenceNode.contains(this.container)) {
|
||||||
this.container = document.createElement('span');
|
this.container = document.createElement('span');
|
||||||
|
|||||||
Reference in New Issue
Block a user