Guest User

Youtube Unsubscribe

a guest
Nov 9th, 2017
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function confirmer() {
  2.     var confirm = confirm = document.getElementsByClassName("overlay-confirmation-unsubscribe-button");
  3.     for (var j = 0; j < confirm.length; j++) {
  4.         confirm[j].click();
  5.     }
  6. }
  7.  
  8. function unsub() {
  9.     console.log("executing loop... i = ", i);
  10.     subs[i].click();
  11.     i++
  12.     setTimeout(confirmer(), 100);
  13.     setTimeout(unsub(), 200);
  14. }
  15.  
  16.  
  17.  
  18. var confirm = document.getElementsByClassName("overlay-confirmation-unsubscribe-button");
  19.  
  20. var subs = document.getElementsByClassName("yt-uix-button-subscribed-branded");
  21.  
  22. var i = 0;
  23.  
  24.  
  25. // To Use:
  26. //  1. log into youtube
  27. //  2. go to this url: https://www.youtube.com/subscription_manager
  28. //  3. add this script as a snippet in the chrome developer panel
  29. //          F12 -> Sources -> Snippets -> New snippet -> copy/paste this code
  30. //  4. click 'Run snippet" in the lower right corrner
  31. //  5. in the Console window, type   `unsub();`    without the quotes, and press enter.
Advertisement
Add Comment
Please, Sign In to add comment