Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sar/86ebd2e09b99eab63ba5971578357fd5 to your computer and use it in GitHub Desktop.
Save sar/86ebd2e09b99eab63ba5971578357fd5 to your computer and use it in GitHub Desktop.
Unsubscribe from YouTube channels in bulk on target page https://www.youtube.com/feed/channels
javascript:(() => {
const timeout = 500;
const buttons = document.querySelectorAll("[aria-label^='Unsubscribe from']");
for(let button of buttons) {
setTimeout(() => {
console.group(button.attributes['aria-label'].value);
setTimeout(() => { button.click(); }, timeout);
setTimeout(() => {
document.querySelector('#confirm-button').click();
}, timeout);
console.groupEnd();
}, timeout);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment