Created
December 20, 2021 14:55
-
-
Save codergautam/4eb558c0edfa89280b6feabbb8f2cf34 to your computer and use it in GitHub Desktop.
Unsubscribe from everyone on YouTube!
This file contains 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
// STEPS TO USE: | |
// 1. Go to https://www.youtube.com/feed/channels | |
// 2. Right click > Inspect Element > Console | |
// 3. Paste script | |
// 4. Press enter | |
var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)").length; | |
tick(); | |
function tick() { | |
if (count == 0) return console.log("Completed! Subscribe to Coder Gautam on YT!"); | |
el = document.querySelector('.ytd-subscribe-button-renderer'); | |
el.click(); | |
setTimeout(function () { | |
var unSubBtn = document.getElementById("confirm-button").click(); | |
count--; | |
console.log(count + " remaining"); | |
setTimeout(function () { | |
el = document.querySelector("ytd-channel-renderer"); | |
el.parentNode.removeChild(el); | |
tick(); | |
}, 5); | |
}, 5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment