Skip to content

Instantly share code, notes, and snippets.

@mindctrl
Created September 11, 2024 17:00
Show Gist options
  • Save mindctrl/5bbcf0cc8ef0846b66d52e1a2379cf86 to your computer and use it in GitHub Desktop.
Save mindctrl/5bbcf0cc8ef0846b66d52e1a2379cf86 to your computer and use it in GitHub Desktop.
JavaScript to unsubscribe from GitHub comments/issues/PRs/whatever
// Why? Because GitHub's UI only allows 25 at a time, and doing it manually with a mouse is annoying.
// With this you can just paste in the console and press enter, wait for reload, do it again.
// I'm sure there's a "better" way, but I did not want to dive into their API docs for a one-time thing.
// Click the Select All checkbox
var el = document.querySelector('[aria-labelledby="select-all-subscriptions-text"]');
el.click();
// Click the Unsubscribe button
var un = document.querySelector('button.ml-3');
un.click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment