Created
April 9, 2018 16:21
-
-
Save kinncj/33539b785eabfc8345b6d671a7bfab5d to your computer and use it in GitHub Desktop.
JS snippet to remove all github branches from a given tab - in my case, the Stale branches tab
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
(function(){ | |
// Run at console from the Stale Branches tab. | |
var rawForms = document.querySelectorAll('.js-branch-destroy > button'), | |
forms = Array.from(rawForms); | |
console.log(forms); | |
forms.forEach(function(form){ | |
console.log(form.click()); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment