Created
August 6, 2021 12:18
-
-
Save LenAnderson/4e8679821d065c126c64939c7294cef6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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