These other answers are great; but in case you are interested, it is not so difficult to make a clean alternative to JS (without jQuery)
function getYouTubeLinks() { var links = document.getElementsByTagName("a"); var ytlinks = []; for(var i=0,l=links.length;i<l;i++){ if(links[i].href.replace("http://","").indexOf("youtube.com") === 0) { ytlinks.push(links[i]); } } return ytlinks; } var youtube = getYouTubeLinks(); for(var i=0,l=youtube.length;i<l;i++){ youtube[i].style.color = "pink"; }
It would be nice to cut the "www". and "https: //".
source share