Skip to content

Instantly share code, notes, and snippets.

@danilobatistaqueiroz
Created April 8, 2026 15:03
Show Gist options
  • Select an option

  • Save danilobatistaqueiroz/67ec190982dc102b4f6311b1695ad7cc to your computer and use it in GitHub Desktop.

Select an option

Save danilobatistaqueiroz/67ec190982dc102b4f6311b1695ad7cc to your computer and use it in GitHub Desktop.
clean-yt-watch-later-list
async function remove(){
document.querySelectorAll("ytd-playlist-video-renderer ytd-menu-renderer yt-icon-button")[0].click();
await delay(1000);
let buttons = document.querySelectorAll("ytd-menu-service-item-renderer yt-formatted-string");
const elements = Array.from(buttons);
elements.find(el => el.textContent.includes('Remove from')).click();
await delay(1000);
}
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
setInterval(remove,7000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment