mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-28 13:20:51 +03:00
fix hover preview segments
This commit is contained in:
@@ -331,7 +331,7 @@ export default class Utils {
|
||||
|
||||
findReferenceNode(): HTMLElement {
|
||||
const selectors = [
|
||||
"#player-container-id",
|
||||
"#player-container",
|
||||
"#movie_player",
|
||||
"#c4-player", // Channel Trailer
|
||||
"#main-panel.ytmusic-player-page", // YouTube music
|
||||
@@ -347,7 +347,7 @@ export default class Utils {
|
||||
let index = 1;
|
||||
|
||||
//find the child that is the video player (sometimes it is not the first)
|
||||
while (index < player.children.length && (!referenceNode.classList.contains("html5-video-player") || !referenceNode.classList.contains("ytp-embed"))) {
|
||||
while (index < player.children.length && (!referenceNode.classList?.contains("html5-video-player") || !referenceNode.classList?.contains("ytp-embed"))) {
|
||||
referenceNode = player.children[index] as HTMLElement;
|
||||
|
||||
index++;
|
||||
|
||||
Reference in New Issue
Block a user