Created
February 29, 2020 20:12
-
-
Save MichaelLeeHobbs/71f8799e625df672ac1ef6ec1dc2e5c4 to your computer and use it in GitHub Desktop.
Youtube Unsubscribe from all channels
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
// go to the url https://www.youtube.com/feed/channels | |
//window.location = 'https://www.youtube.com/feed/channels' | |
// hit f12 and paste the below into the dev console then wait | |
function unsubscribeAll(channels) { | |
channels = channels || document.getElementById("grid-container").getElementsByClassName("ytd-expanded-shelf-contents-renderer") | |
channels[0].querySelector("[aria-label^='Unsubscribe from']").click() | |
setTimeout(()=> { | |
document.getElementById("confirm-button").click() | |
channels[0].parentNode.removeChild(channels[0]) | |
setTimeout(()=>{ | |
channels = document.getElementById("grid-container").getElementsByClassName("ytd-expanded-shelf-contents-renderer") | |
if (channels.length > 0) return unsubscribeAll(channels) | |
},2000) | |
}, 2000) | |
} | |
unsubscribeAll() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment