Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save karuppasamy/9ef615461f252db44463b80fb1705fea to your computer and use it in GitHub Desktop.

Select an option

Save karuppasamy/9ef615461f252db44463b80fb1705fea to your computer and use it in GitHub Desktop.
Script to remove all videos from Youtube Watch Later playlist
  1. Open your watch later playlist on youtube.
  2. Open the development console for your browser ( Ctrl+Shift+J for chrome, Ctrl+Shift+K for firefox )
  3. paste this script into the console
var interval = setInterval(removeOne, 750)

var lastNumVideos = 0

function removeOne () {
  var numVideos = document.querySelectorAll('.pl-video-edit-remove').length
  if (numVideos === lastNumVideos) {
    return
  }
  if (numVideos < 2) {
    try {
      document.querySelector('.browse-items-load-more-button').click()
    } catch (err) {
      console.log('Load More button is missing. Refresh the page and restart the script to remove more videos.')
      clearInterval(interval)
    }
  }
  document.querySelector('.pl-video-edit-remove').click()
  lastNum = numVideos
}
  1. Press the enter key
  2. Watch your watch later playlist empty in realtime :D

If you need to stop the script simply close or refresh the playlists's tab in your browser.

Enjoy! :D

I haven't tried, but this should work on other playlists as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment