Advertisement
NasuiAlexandra

Unsubscribe All Channels

Aug 31st, 2021
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. var i = 0;
  2.  
  3. var myVar = setInterval(myTimer, 200);
  4.  
  5. function myTimer () {
  6.  
  7.     var els = document.getElementById("contents").getElementsByClassName("ytd-subscribe-button-renderer");
  8.  
  9.     if (i < els.length) {
  10.  
  11.         els[i].querySelector('.ytd-subscribe-button-renderer').click();
  12.  
  13.         setTimeout(function () {
  14.  
  15.             var unSubBtn = document.getElementById("confirm-button").click();
  16.  
  17.         }, 500);
  18.  
  19.         setTimeout(function () {
  20.  
  21.             els[i].parentNode.removeChild(els[i]);
  22.  
  23.         }, 1000);
  24.     }
  25.  
  26.     i++;
  27.  
  28.     console.log(i + " unsubscribed");
  29.     console.log(els.length + " remaining");
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement