Last active
November 11, 2019 20:46
-
-
Save maschad96/5edb9c161422d25dc2f40072e17ee015 to your computer and use it in GitHub Desktop.
Unwatch repositories belonging to organizations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 - Navigate to github.om/watching | |
2 - Run the following in the browser | |
const rows = document.querySelectorAll('.Box-row'); | |
rows.forEach(row => { | |
const name = row.querySelector('a').getAttribute('href'); | |
const popover = row.querySelector('summary'); | |
// If the name doesn't match our desired orgs to unwatch, return early | |
if ( ! name.match(/ORG1|OTHER_ORG/g) ) return; | |
popover.click(); | |
const button = row.querySelector('button[value="ignore"]'); | |
button.click(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment