Created
July 3, 2021 20:00
-
-
Save TheRusskiy/7239172d3338bf44ad3ed470776af6f8 to your computer and use it in GitHub Desktop.
Remove "Watch Later" videos from youtube
This file contains hidden or 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
buttons=[] | |
document.querySelectorAll('ytd-playlist-video-renderer ytd-menu-renderer #button.style-scope.yt-icon-button').forEach(b => buttons.push(b)) | |
while(bs.length > 0) { | |
let button = buttons.pop() | |
button.click() | |
await (new Promise(resolve => setTimeout(resolve, 500))) | |
let dropdownItems = []; | |
document.querySelectorAll('tp-yt-paper-listbox tp-yt-paper-item').forEach(n => dropdownItems.push(n)); | |
dropdownItems.find(e => e.textContent.includes('Remove from Watch later')).click() | |
await (new Promise(resolve => setTimeout(resolve, 3000))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment