Last active
August 29, 2015 14:23
-
-
Save fmvilas/19d42e8dd3155a6f7b71 to your computer and use it in GitHub Desktop.
Remove botdylan comments
![:trollface: :trollface:](https://github.githubassets.com/images/icons/emoji/trollface.png)
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() { | |
var clickEvent = new Event('click'); | |
var delete_buttons = document.querySelectorAll('[alt="@botdylan"]+.timeline-comment-actions .js-comment-delete button[type="submit"]'); | |
for(var i=0; i < delete_buttons.length; i++) { | |
try { | |
delete_buttons[i].attributes.removeNamedItem('data-confirm'); | |
delete_buttons[i].dispatchEvent(clickEvent); | |
} catch (e) { | |
console.log('Failed to remove comment.'); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment