Skip to content

Instantly share code, notes, and snippets.

@sirex
Last active August 29, 2015 14:15
Show Gist options
  • Save sirex/a894d6a43334027e24d6 to your computer and use it in GitHub Desktop.
Save sirex/a894d6a43334027e24d6 to your computer and use it in GitHub Desktop.
Selectively unwatch github repositories.
// In case you are a member of a big organization, you may want to unwatch a lot of repositories, by some filter.
// This code snippet allows to unwatch many repositories at once by specified filter.
// Modify this snippet by your needs and paste it to the JavaScript console in your browser.
// https://github.com/watching
$( "button" ).each( function() {
var text = $.trim( $(this).text() );
var repo = $.trim( $(this).closest("li.js-subscription-row").find("a").text() );
if ( text == "Unwatch" && repo.match(/^zopefoundation/) ) {
$(this).click();
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment