Skip to content

Instantly share code, notes, and snippets.

@seraph
Forked from DessertArbiter/yt-unsub.js
Created November 22, 2017 20:49
Show Gist options
  • Save seraph/e9d8057b25ef883683d810b80b620cbd to your computer and use it in GitHub Desktop.
Save seraph/e9d8057b25ef883683d810b80b620cbd to your computer and use it in GitHub Desktop.
Unsubscribe from all YouTube channels on current page
var button = document.getElementsByClassName("subscribed-label");
for(var i=0;i<button.length;i++)
{
button[i].click();
var unsub = document.getElementsByClassName("overlay-confirmation-unsubscribe-button");
//console.log(unsub.length)
for(var j=0;j<unsub.length;j++)
unsub[j].click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment