Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Apr 3, 2024
1 parent 9240c71 commit c0b1679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if (this.storage.player_force_speed_on_music === true)
return;}
if (DATA.keywords && !keywords) { keywords = DATA.keywords.join(', ') || ''; }
if (keywords === 'video, sharing, camera phone, video phone, free, upload') { keywords = ''; }
var musicIdentifiers = /(official|music|lyrics)[ -]video|(cover|studio|radio|album|alternate)[- ]version|soundtrack|unplugged|\bmedley\b|\blo-fi\b|\blofi\b|a(lla)? cappella|feat\.|(piano|guitar|jazz|ukulele|violin|reggae)[- ](version|cover)|karaok|backing[- ]track|instrumental|(sing|play)[- ]?along|卡拉OK|卡拉OK|الكاريوكي|караоке|カラオケ|노래방|bootleg|mashup|Radio edit|Guest (vocals|musician)|(title|opening|closing|bonus|hidden)[ -]track|live acoustic|interlude|featuring|recorded (at|live)/i;
var musicIdentifiers = /(official|music|lyrics?)[ -]video|(cover|studio|radio|album|alternate)[- ]version|soundtrack|unplugged|\bmedley\b|\blo-fi\b|\blofi\b|a(lla)? cappella|feat\.|(piano|guitar|jazz|ukulele|violin|reggae)[- ](version|cover)|karaok|backing[- ]track|instrumental|(sing|play)[- ]?along|卡拉OK|卡拉OK|الكاريوكي|караоке|カラオケ|노래방|bootleg|mashup|Radio edit|Guest (vocals|musician)|(title|opening|closing|bonus|hidden)[ -]track|live acoustic|interlude|featuring|recorded (at|live)/i;
var musicIdentifiersTitleOnly = /lyrics|theme song|\bremix|\bAMV ?[^a-z0-9]|[^a-z0-9] ?AMV\b|\bfull song\b|\bsong:|\bsong[\!$]|^song\b|( - .*\bSong\b|\bSong\b.* - )|cover ?[^a-z0-9]|[^a-z0-9] ?cover|\bconcert\b/i;
var musicIdentifiersTitle = new RegExp(musicIdentifiersTitleOnly.source + '|' + musicIdentifiers.source, "i");
var musicRegexMatch = musicIdentifiersTitle.test(DATA.title);
Expand Down Expand Up @@ -426,7 +426,7 @@ ImprovedTube.subtitlesDisableLyrics = function () {
if (player && player.toggleSubtitles && button && button.getAttribute('aria-pressed') === 'true') {
// Music detection only uses 3 identifiers for Lyrics: lyrics, sing-along, karaoke.
// Easier to simply use those here. Can replace with music detection later.
const terms = ["sing?along", "karaoke", "lyric"];
const terms = ["sing along", "sing-along", "karaoke", "lyric", "卡拉OK", "卡拉OK", "الكاريوكي", "караоке", "カラオケ","노래방"];
if (terms.some(term => ImprovedTube.videoTitle().toLowerCase().includes(term))) {
player.toggleSubtitles();
}
Expand Down

0 comments on commit c0b1679

Please sign in to comment.