Last active
November 15, 2018 12:55
-
-
Save DimaRGB/94d9857b84c31c01bb369defc47977bc to your computer and use it in GitHub Desktop.
unwatch github organization repos
This file contains 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
// example: unwatchOrgRepos('wkda') | |
// run this function on all pages https://github.com/watching | |
function unwatchOrgRepos(orgName) { | |
let orgRepoTitleNodes = document.querySelectorAll(`[title=${orgName}]`); | |
Array.prototype.map.call(orgRepoTitleNodes, span => { | |
span.parentElement.parentElement.parentElement.querySelector('.js-unsubscribe-form>[type=submit]').click() | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment