Forked from timothyarmstrong/delete-videos-from-playlist.js
Last active
January 26, 2022 03:06
-
-
Save jfred/03aa15ec243577d5ee06 to your computer and use it in GitHub Desktop.
Delete all watched 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 watched = document.querySelector('.watched'); | |
var closeButton = watched ? watched.parentNode.parentNode.parentNode.querySelector('.pl-video-edit-remove') : false; | |
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