Skip to content

Instantly share code, notes, and snippets.

@oliveiracdz
Last active May 25, 2018 15:14
Show Gist options
  • Save oliveiracdz/6fe18ba43049d72e61bc6793390cea44 to your computer and use it in GitHub Desktop.
Save oliveiracdz/6fe18ba43049d72e61bc6793390cea44 to your computer and use it in GitHub Desktop.
var deleteDeployment = function (it) {
it.click()
setTimeout(function () {
$('.md-dialog-container .delete-dialog button.md-raised:contains("Excluir")').click()
}, 300)
}
$('.h5g-hist-status-deployed')
.map((i, a) => $(a).parent())
.map((i, a) => ({
parent: $(a),
button: $(a).find('md-menu button:contains(Excluir)')
}))
.each((i, it) => {
setTimeout(function () {
console.log('Excluindo ' + (i + 1))
it.parent.get(0).scrollIntoView()
deleteDeployment(it.button)
}, (i + 1) * 2000)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment