Created
March 18, 2011 01:35
-
-
Save mutaku/875482 to your computer and use it in GitHub Desktop.
bookmarklet to get all video links in youtube playlist displayed in alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: | |
if (typeof jQuery == 'undefined') { | |
var jQ = document.createElement('script'); | |
jQ.type = 'text/javascript'; | |
jQ.onload=runthis; | |
jQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; | |
document.body.appendChild(jQ); | |
} | |
else { | |
runthis(); | |
} | |
function runthis() { | |
var thelinks = ""; | |
var thislink; | |
$('div.vm-video-title').each(function() { | |
thislink = $(this).find('a').attr('href'); | |
thislink = "http://youtube.com" + thislink + "\n"; | |
thelinks = thelinks + thislink; | |
}); | |
if(thelinks.length != 0){ | |
alert(thelinks); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment