Last active
December 9, 2021 21:20
-
-
Save robleh/f5bff8f7bfeedcc9296215334207da66 to your computer and use it in GitHub Desktop.
Unsubscribe from all YouTube subcriptions
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
| subButtons = document.getElementsByClassName("style-scope ytd-subscribe-button-renderer") | |
| for (i = 0; i < subButtons.length; i++) { | |
| if (subButtons[i].tagName == "TP-YT-PAPER-BUTTON") { | |
| if (subButtons[i].getAttribute("aria-label").startsWith("Unsubscribe")) { | |
| subButtons[i].click(); | |
| document.getElementsByClassName("style-scope yt-button-renderer style-blue-text size-default")[0].click(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment