Skip to content

Instantly share code, notes, and snippets.

@Explosion-Scratch
Created November 4, 2021 16:25
Show Gist options
  • Save Explosion-Scratch/ebd740b817c9d5fd9e26677836faf098 to your computer and use it in GitHub Desktop.
Save Explosion-Scratch/ebd740b817c9d5fd9e26677836faf098 to your computer and use it in GitHub Desktop.
Remove all videos from watch later (YouTube)
PLEASE_STOP = false;
//set PLEASE_STOP to true to stop removing videos
while (window.PLEASE_STOP === false) {
document.querySelector("ytd-playlist-video-renderer .yt-icon-button").click();
await new Promise((r) => setTimeout(r, 100));
[...document.querySelectorAll("ytd-menu-popup-renderer tp-yt-paper-item")]
.find((i) => i.innerText.includes("Remove from"))
.click();
await new Promise((r) => setTimeout(r, 400));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment