Skip to content

Instantly share code, notes, and snippets.

@sohailalam2
Last active September 24, 2019 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sohailalam2/dfe67bffa48b0273c27904b1f51e2836 to your computer and use it in GitHub Desktop.
Save sohailalam2/dfe67bffa48b0273c27904b1f51e2836 to your computer and use it in GitHub Desktop.
Unwatch All Org Repos Automation
// Navigate to https://github.com/watching and then run:
// Taken from: https://gist.github.com/offirgolan/9b12a2a170f70d0d70e2238e8661e382#gistcomment-2986393
(() => {
const org = 'getndazn'
const nodes = document.querySelectorAll('.Box-row');
const rows = [ ...nodes ];
const orgRows = rows.filter((e) => e.innerText.startsWith(` ${org}/`));
const orgUnsubButtons = orgRows.map(row => row.querySelector('button.select-menu-item[value="included'));
orgUnsubButtons.forEach(button => console.log(button.click()));
setTimeout(() => location.reload(), 100);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment