Created
August 13, 2018 16:29
-
-
Save endophage/391d0998c795332bd1187573e13a3ed5 to your computer and use it in GitHub Desktop.
Unwatch org in GitHub
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
| // From https://github.com/isaacs/github/issues/641#issuecomment-328716343 | |
| // 1. Go to https://github.com/watching | |
| // 2. Open JS console and paste in function | |
| // 3. Call function with desired org you want to unwatch. | |
| function unwatchOrgRepos(orgName) { | |
| var repoItems = document.querySelectorAll(".repo-list > li") | |
| repoItems.forEach(function (item) { | |
| var repoOrgElement = item.querySelector(".repo-name").previousElementSibling; | |
| var repoOrgName = repoOrgElement.innerText; | |
| if (repoOrgName === orgName) { | |
| var unwatchButton = item.querySelector(".js-unsubscribe-form > button"); | |
| unwatchButton.click(); | |
| var itemName = repoOrgElement.parentElement.innerText; | |
| console.log("Unwatched " + itemName); | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment