Created
February 23, 2020 15:35
-
-
Save rafi/477a7ff9113ab035056d7dbdfae98ca7 to your computer and use it in GitHub Desktop.
Unwatch all repos of organization
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
// Browse to https://github.com/watching and run in console: | |
(function() { | |
let qx = $x; | |
let unwatch = function(org) { | |
let nodes = document.querySelectorAll('.Box-row'); | |
let rows = [ ...nodes ]; | |
let orgRows = rows.filter(e => e.innerText.startsWith(` ${org}/`)); | |
let orgUnsubButtons = orgRows.map(row => row.querySelector('button.select-menu-item[value="included"]')); | |
orgUnsubButtons.forEach(button => console.log(button.click())); | |
setTimeout(function() { | |
qx("//a[text()='Next']")[0].click(); | |
}, 1000); | |
}; | |
let org = 'ORG'; // <--- change ORG to desired organization | |
unwatch(org); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment