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.
Hey everyone!
Just pushed the 2.0 version of my Youtube Playlist Cleaner script that I mentioned in this convo before.
Link to the script: https://github.com/John-nata/YT-Playlist-Cleaner
Big thanks to every single person from this convo who starred my script (over 40!) and reported issues- you made this vrsion way better than I could've done alone!
New Features:
UI Redesign:
Rebuilt the nterface with a YouTube/Material Design vibe- status badges, hover effects with that subtle red glow, theme recolor, sun/moon toggle icons.
Fixes:
Check out the release notes for the full changelog.
Happy YT cleaning guys! 🧹