Skip to content

Commit

Permalink
Update functions.js subtitles by button turned out dead end
Browse files Browse the repository at this point in the history
  • Loading branch information
raszpl authored Jun 20, 2024
1 parent 0601bf6 commit 724d782
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions js&css/web-accessible/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,3 @@ ImprovedTube.extractSubscriberCount = function (subscriberCountNode) {
ImprovedTube.subscriberCount = subscriberCount;
}
};

// true if any subtitles are available at this moment
// YT doesnt have a function returning status of captions currently loaded, checking button color is the only way I could find :(
ImprovedTube.subtitlesEnabled = function () {
return this.elements.player_subtitles_button?.childNodes?.[0]?.getAttribute('fill-opacity') == 1;
};

0 comments on commit 724d782

Please sign in to comment.