Skip to content

Instantly share code, notes, and snippets.

@codewizard13
Last active November 7, 2015 19:32
Show Gist options
  • Save codewizard13/dd0326f792e06a9ef3f2 to your computer and use it in GitHub Desktop.
Save codewizard13/dd0326f792e06a9ef3f2 to your computer and use it in GitHub Desktop.
/*
CREATOR: Eric Hepperle
DATE: 2015.11.07
PURPOSE: Make text (HTML) playlist from YouTube playlist
*/
var arrLinkObjs = $('a.pl-video-title-link');
var strOut = '<div id="outResult"><ul style="list-style-type:none">'
arrLinkObjs.each(function(i,v) {
var yt_title = $(this).text();
var count = i + 1;
console.log("TITLE [" + count + "]: " + yt_title);
strOut += "<li>" + count + ") " + yt_title + "<br /></li>";
});
strOut += '</li></div>';
// Launch results in new window:
var win = window.open("");
win.document.body.innerHTML = strOut;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment