Skip to content

Commit

Permalink
#1776 the word soundtrack usually means music
Browse files Browse the repository at this point in the history
  • Loading branch information
ImprovedTube committed Sep 28, 2023
1 parent c0af89c commit bdc9e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js&css/web-accessible/www.youtube.com/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ImprovedTube.playerPlaybackSpeed = function () {
if (this.storage.player_dont_speed_education === true && category === 'Education') {return;}
if (this.storage.player_force_speed_on_music === true) {player.setPlaybackRate(Number(option)); video.playbackRate = Number(option); return;}
let titleAndKeywords = document.getElementsByTagName('meta')?.title?.content + " " + document.getElementsByTagName('meta')?.keywords?.content || false;
let musicRegexMatch = /official (music )?video|lyrics|cover[\)\]]|[\(\[]cover|cover version|karaok|(sing|play)[- ]?along|OK|OK|الكاريوكي|караоке||/i.test(titleAndKeywords);
let musicRegexMatch = /official (music )?video|lyrics|cover[\)\]]|[\(\[]cover|cover version|soundtrack|karaok|(sing|play)[- ]?along|OK|OK|الكاريوكي|караоке||/i.test(titleAndKeywords);
let notMusicRegexMatch = /do[ck]u|interv[iyj]|back[- ]?stage||entrevista||||wawancara|مقابلة|интервью|entretien| ||||وثائقي|документальный/i.test(titleAndKeywords); // (Tags/keywords shouldnt lie & very few songs titles might have these words)
let duration = document.querySelector('meta[itemprop=duration]')?.content || false; // Example: PT1H20M30S
if (duration) {
Expand Down

0 comments on commit bdc9e0e

Please sign in to comment.