Last active
July 16, 2017 08:57
-
-
Save maruf89/0f92bb32d1006d0429047cb9f0700530 to your computer and use it in GitHub Desktop.
Clear your youtube watch later playlist. Paste this into your inspector, change the start & end variables to only remove a portion, or all videos in your 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
var start = 0; // starts from the first video | |
var end = 9; // deletes the first ten videos, set to -1 to remove all | |
var removeButtons = Array.prototype.slice.call(document.querySelectorAll('.pl-video .pl-video-edit-remove'), start, end); | |
// gathers all of the remove buttons and triggers a click event on all of the selected with a 250 ms interval | |
removeButtons.forEach(function (elem, index) { setTimeout(function () { console.log('removing index ' + index); elem.click() }, index * 250) }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment