Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MN-dev/1b2d8de457546518a50f to your computer and use it in GitHub Desktop.
Save MN-dev/1b2d8de457546518a50f to your computer and use it in GitHub Desktop.
Delete all videos in YouTube Playlist
(function() {
var i = window.setInterval(function() {
var closeButton = document.querySelector('.pl-video-edit-remove');
if (closeButton) {
closeButton.click();
} else {
window.clearInterval(i);
}
}, 500);
})();
@MN-dev
Copy link
Author

MN-dev commented Jan 2, 2016

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment