From eff34d5daa0d5fc8940dbde3cab1c20da20aca8a Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Wed, 6 Dec 2023 13:29:41 +0100 Subject: [PATCH] regex typo player.js --- js&css/web-accessible/www.youtube.com/player.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js&css/web-accessible/www.youtube.com/player.js b/js&css/web-accessible/www.youtube.com/player.js index bca88f66a..632149cc5 100644 --- a/js&css/web-accessible/www.youtube.com/player.js +++ b/js&css/web-accessible/www.youtube.com/player.js @@ -81,11 +81,11 @@ 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 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 musicIdentifiersTitle = new RegExp(musicIdentifiersTitleOnly.source + '|' + musicIdentifiers.source, "i"); var musicRegexMatch = musicIdentifiersTitle.test(DATA.title); if (!musicRegexMatch) { var musicIdentifiersTagsOnly = /, (lyrics|remix|song|music|AMV|theme song|full song),|\(Musical Genre\)|, jazz|, reggae/i; - var musicIdentifiersTags = new RegExp(musicIdentifiersTagsOnly.source + musicIdentifiers.source, "i"); + var musicIdentifiersTags = new RegExp(musicIdentifiersTagsOnly.source + '|' + musicIdentifiers.source, "i"); keywordsAmount = 1 + ((keywords || '').match(/,/) || []).length; if ( ((keywords || '').match(musicIdentifiersTags) || []).length / keywordsAmount > 0.08) { musicRegexMatch = true}}