Skip to content

Instantly share code, notes, and snippets.

@LenAnderson
Created August 6, 2021 12:18
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 LenAnderson/4e8679821d065c126c64939c7294cef6 to your computer and use it in GitHub Desktop.
Save LenAnderson/4e8679821d065c126c64939c7294cef6 to your computer and use it in GitHub Desktop.
(async()=>{
const wait = async(ms)=>new Promise(resolve=>setTimeout(resolve, ms));
let btn = document.querySelector('ytd-playlist-video-renderer button[aria-label="Action menu"]');
while (btn) {
btn.click();
await wait(100);
Array.from(document.querySelectorAll('ytd-menu-service-item-renderer')).filter(it=>it.textContent.trim() == 'Remove from Watch later').forEach(it=>it.click());
btn = document.querySelector('ytd-playlist-video-renderer button[aria-label="Action menu"]');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment