Skip to content

Instantly share code, notes, and snippets.

Adam Axfan

Block or report user

Report or block Axfan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Axfan
Axfan / FormatPlaylist.js
Created Jun 11, 2015
Get a youtube playlist in comma delimetered format
View FormatPlaylist.js
var videos = document.getElementsByClassName("pl-video");
var videoIDs = [];
for ( v = 0; v < videos.length; v++ ) {
videoIDs.push( videos[v].getAttribute("data-video-id") );
}
window.alert(videoIDs.toString());
@Axfan
Axfan / CreatePlaylist.js
Created Jun 11, 2015
Add videos from a youtube playlist to InstaSync
View CreatePlaylist.js
var videoString = "";
var videoIDs = videoString.split(",");
var v =0;
setInterval(function() {
if (v < videoIDs.length) {
$("#add_video_url").val("http://youtube.com/watch?v=" + videoIDs[v]);
$("#add_video_btn")[0].click();
v++;
}
@Axfan
Axfan / RemovePlaylist.js
Created Jun 11, 2015
Clear the InstaSync playlist
View RemovePlaylist.js
var playlist_length = $("#playlist li").length;
var videosRemoved = 0;
setInterval(function() {
if (videosRemoved < playlist_length) {
$(".remove-video")[0].click();
videosRemoved++;
}
}, 250);
You can’t perform that action at this time.