diff options
-rw-r--r-- | youtube/static/js/plyr-start.js | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/youtube/static/js/plyr-start.js b/youtube/static/js/plyr-start.js index d9fde90..15e096b 100644 --- a/youtube/static/js/plyr-start.js +++ b/youtube/static/js/plyr-start.js @@ -1,17 +1,10 @@ (function main() { 'use strict'; - let captionsActive; - - switch(true) { - case data.settings.subtitles_mode == 2: - captionsActive = true; - break; - case data.settings.subtitles_mode == 1 && data.has_manual_captions: - captionsActive = true; - break; - default: - captionsActive = false; + // Captions + let captionsActive = false; + if (data.settings.subtitles_mode === 2 || (data.settings.subtitles_mode === 1 && data.has_manual_captions)) { + captionsActive = true; } // AutoPlay |