File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ Connector.getTrackInfo = () => {
6161
6262Connector . getTimeInfo = ( ) => {
6363 const videoElement = document . querySelector ( videoSelector ) ;
64- if ( videoElement && areChaptersMissing ( ) ) {
64+ if ( videoElement && ! areChaptersAvailable ( ) ) {
6565 const { currentTime, duration } = videoElement ;
6666
6767 return { currentTime, duration } ;
@@ -75,6 +75,10 @@ Connector.isPlaying = () => {
7575} ;
7676
7777Connector . getUniqueID = ( ) => {
78+ if ( areChaptersAvailable ( ) ) {
79+ return null ;
80+ }
81+
7882 /*
7983 * ytd-watch-flexy element contains ID of a first played video
8084 * if the miniplayer is visible, so we should check
@@ -122,8 +126,8 @@ function setupEventListener() {
122126 $ ( videoSelector ) . on ( 'timeupdate' , Connector . onStateChanged ) ;
123127}
124128
125- function areChaptersMissing ( ) {
126- return ! Util . getTextFromSelectors ( chapterNameSelector ) ;
129+ function areChaptersAvailable ( ) {
130+ return Util . getTextFromSelectors ( chapterNameSelector ) ;
127131}
128132
129133/**
You can’t perform that action at this time.
0 commit comments