mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
add selectors for YT kids
This commit is contained in:
parent
87bf472ee4
commit
60f9274438
3 changed files with 5 additions and 3 deletions
|
@ -521,7 +521,7 @@ function createPreviewBar(): void {
|
|||
selector: ".vjs-progress-holder",
|
||||
isVisibleCheck: false
|
||||
}, {
|
||||
// For Youtube Music
|
||||
// For Youtube Music and YTKids
|
||||
// there are two sliders, one for volume and one for progress - both called #progressContainer
|
||||
selector: "#progress-bar>#sliderContainer>div>#sliderBar>#progressContainer",
|
||||
}, {
|
||||
|
|
|
@ -97,7 +97,8 @@ class PreviewBar {
|
|||
this.chapterTooltip = document.createElement("div");
|
||||
this.chapterTooltip.className = "ytp-tooltip-title sponsorCategoryTooltip";
|
||||
|
||||
const tooltipTextWrapper = document.querySelector(".ytp-tooltip-text-wrapper");
|
||||
// global chaper tooltip or duration tooltip
|
||||
const tooltipTextWrapper = document.querySelector(".ytp-tooltip-text-wrapper") ?? document.querySelector("#progress-bar-container.ytk-player > #hover-time-info");
|
||||
const originalTooltip = tooltipTextWrapper.querySelector(".ytp-tooltip-title:not(.sponsorCategoryTooltip)") as HTMLElement;
|
||||
if (!tooltipTextWrapper || !tooltipTextWrapper.parentElement) return;
|
||||
|
||||
|
|
|
@ -299,7 +299,8 @@ export default class Utils {
|
|||
"#main-panel.ytmusic-player-page", // YouTube music
|
||||
"#player-container .video-js", // Invidious
|
||||
".main-video-section > .video-container", // Cloudtube
|
||||
".shaka-video-container" // Piped
|
||||
".shaka-video-container", // Piped
|
||||
"#player-container.ytk-player", // YT Kids
|
||||
];
|
||||
|
||||
let referenceNode = findValidElementFromSelector(selectors)
|
||||
|
|
Loading…
Reference in a new issue