Skip to content

Instantly share code, notes, and snippets.

@martinlaws
Created April 11, 2019 19:22
Show Gist options
  • Save martinlaws/51c420e3f66afbd549ba53e026ec23ed to your computer and use it in GitHub Desktop.
Save martinlaws/51c420e3f66afbd549ba53e026ec23ed to your computer and use it in GitHub Desktop.
Unwatch all GitHub repos in an org
Array.prototype
.slice.apply(document.querySelectorAll('.Box-row'))
.forEach(el => {
const org = el.querySelector('a[href^="/YOUR_ORG"]');
if (org) el.querySelector('button[value="included"]').click()
});
var xpath = "//a[text()='Next']";
var matchingElement = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
matchingElement.click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment