Last active
June 29, 2023 00:05
-
-
Save sdawood/87729ed43be541cb6851d2237467adf1 to your computer and use it in GitHub Desktop.
How to remove all videos from Youtube Watch later list
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
| /* Quoted from: | |
| * https://www.alphr.com/delete-all-watch-later-videos-youtube/ | |
| * The above used xpath with a span, which doesn't work for Youtube as of June 2023 | |
| */ | |
| setInterval(function () { | |
| document.querySelector('#primary button[aria-label="Action menu"]').click(); | |
| var things = document.evaluate( '//yt-formatted-string[contains(text(),"Remove from")]', | |
| document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); | |
| for (var i = 0; i < things.snapshotLength; i++) { things.snapshotItem(i).click(); } | |
| }, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment