Forked from timothyarmstrong/delete-videos-from-playlist.js
Created
January 2, 2016 02:08
-
-
Save MN-dev/1b2d8de457546518a50f to your computer and use it in GitHub Desktop.
Delete all videos in YouTube Playlist
This file contains 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
(function() { | |
var i = window.setInterval(function() { | |
var closeButton = document.querySelector('.pl-video-edit-remove'); | |
if (closeButton) { | |
closeButton.click(); | |
} else { | |
window.clearInterval(i); | |
} | |
}, 500); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or
http://pastebin.com/GcZzZBxp
javascript:
function d(){
var el = document.getElementsByClassName('pl-video-edit-remove');
if (el.length > 0) {
el[el.length-1].click();
setTimeout(d,300);
}
}
d();
========================================================================or=================================
var el = document.getElementsByClassName("yt-uix-button-icon yt-uix-button-icon-dismissal yt-sprite");
for (var i=0;i<el.length; i++) {
el[i].click();
}
========================================================================or=================================
javascript:
function d(){
var el = document.getElementsByClassName('yt-uix-button-icon yt-uix-button-icon-dismissal yt-sprite');
if (el.length > 0) {
el[el.length-1].click();
setTimeout(d,10);
}
}
d();