Skip to content

Instantly share code, notes, and snippets.

@bernatgy
Created March 5, 2023 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bernatgy/cf948f8b538c99f3178c8ebf480fe19f to your computer and use it in GitHub Desktop.
Save bernatgy/cf948f8b538c99f3178c8ebf480fe19f to your computer and use it in GitHub Desktop.
A script to execute in the Browser DevTools Console to slowly clear out your Watch Later playlist
function openMenu() {
var items = document.querySelectorAll('ytd-playlist-video-renderer > #menu button');
items[0].click();
}
function clickRemove() {
var menuItems = document.querySelectorAll('tp-yt-paper-listbox > ytd-menu-service-item-renderer');
menuItems[2].click();
}
setInterval(function () {
openMenu();
setTimeout(function () {
clickRemove();
}, 300);
}, 750);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment