Forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Created
March 17, 2023 20:22
-
-
Save karuppasamy/9ef615461f252db44463b80fb1705fea to your computer and use it in GitHub Desktop.
Script to remove all videos from Youtube Watch Later playlist
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
| UPDATED 22.11.2022 | |
| It's been two years since the last update, so here's the updated working script as per the comments below. | |
| Thanks to [BryanHaley](https://gist.github.com/BryanHaley) for this. | |
| ```javascript | |
| setInterval(function () { | |
| video = document.getElementsByTagName('ytd-playlist-video-renderer')[0]; | |
| video.querySelector('#primary button[aria-label="Action menu"]').click(); | |
| var things = document.evaluate( | |
| '//span[contains(text(),"Remove from")]', | |
| document, | |
| null, | |
| XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, | |
| null | |
| ); | |
| for (var i = 0; i < things.snapshotLength; i++) | |
| { | |
| things.snapshotItem(i).click(); | |
| } | |
| }, 500); | |
| ``` | |
| Non-english users will need to change "Action menu" and "Remove from" to what YouTube uses for their localization. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment