Guest User

YouTube - Clear Watch Later

a guest
Feb 15th, 2019
80,676
2
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 2 0
  1. var items = $('body').getElementsByClassName("yt-uix-button yt-uix-button-size-default yt-uix-button-default yt-uix-button-empty yt-uix-button-has-icon no-icon-markup pl-video-edit-remove yt-uix-tooltip");
  2. function deleteWL(i) {
  3. setInterval(function() {
  4. items[i].click();
  5. }, 500);
  6. }
  7. for (var i = 0; i < 1; ++i)
  8. deleteWL(i);
Comments
  • MsG110
    123 days
    # text 0.48 KB | 0 0
    1. The posted script for YouTube is no longer functional. However, I found a new one that works perfectly fine. It deletes the videos one by one automatically.
    2.  
    3. setInterval(function() {
    4. document.querySelector('#contents button#button').click();
    5. var things = document.evaluate('//span[contains(text(),"Watch later")]',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
    6. for (var i = 0; i < things.snapshotLength; i++) {
    7. things.snapshotItem(i).click();
    8. }
    9. }, 1000);
Add Comment
Please, Sign In to add comment