Skip to content

Instantly share code, notes, and snippets.

@willwm
Created July 19, 2020 04:16
Show Gist options
  • Save willwm/48d0897e662a76251288a5fcdb8e8746 to your computer and use it in GitHub Desktop.
Save willwm/48d0897e662a76251288a5fcdb8e8746 to your computer and use it in GitHub Desktop.
Bookmarklet: Delete YouTube Playlist (from playlist page)
javascript: (async() => {
const sleep = () => { return new Promise(resolve => setTimeout(resolve, 500)); };
const deletePlaylist = async() => {
document.querySelector('.ytd-playlist-sidebar-primary-info-renderer > #button > #button > .style-scope').click(); await sleep();
document.querySelector('.ytd-menu-popup-renderer:nth-child(5) .style-scope:nth-child(2)').click(); await sleep();
document.querySelectorAll('.yt-simple-endpoint .style-scope .yt-button-renderer')[1].click(); await sleep();
};
await deletePlaylist();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment