UPDATED 22.11.2022
It's been two years since the last update, so here's the updated working script as per the comments below.
Thanks to BryanHaley for this.
setInterval(function () {
video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];
video.querySelector('#primary button[aria-label="Action menu"]').click();
var things = document.evaluate(
'//span[contains(text(),"Remove from")]',
document,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null
);
for (var i = 0; i < things.snapshotLength; i++)
{
things.snapshotItem(i).click();
}
}, 500);
Non-english users will need to change "Action menu" and "Remove from" to what YouTube uses for their localization.
Hi guys!
Just wanna share my userscript (inspired by @colejd's script) to helps you tidy up your YT playlists : YT-Playlist-Cleaner
Here are the key features :
-Customisable settings for deletion criteria
-Auto-scroll functionality to process large playlists
-Improved user interface with progress bar and status updates
-Pause and resume functionality
-Configurable delays between deletions to avoid rate limiting
Tbh, I received some helpful suggestions from Claude AI to optimize some parts of my script before uploading it online.
Let me know what you think!