Skip to content

Instantly share code, notes, and snippets.

@mesartwell
Created March 2, 2022 00:35
Show Gist options
  • Save mesartwell/18ca115ee373bea461b375f689fd6a03 to your computer and use it in GitHub Desktop.
Save mesartwell/18ca115ee373bea461b375f689fd6a03 to your computer and use it in GitHub Desktop.
youtube: clear Watch Later playlist
// navigate to Watch Later playlist then enter the following in the JS console (ctrl+shift+j) in chrome)
// note: it simulates browser clicks and runs in a serial fashion
// src: a comment from https://www.alphr.com/delete-all-watch-later-videos-youtube
setInterval(() => {
// NOTE: This direct indexing is hacky but my JS skills are too weak to improve it.
// The index is not stable and can change w/o notice.
document.querySelectorAll(".style-scope.ytd-menu-renderer")[7].click()
document.querySelectorAll(".style-scope.ytd-menu-service-item-renderer")[6].click()
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment