Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save crowbarsolutions/d5ae9997bb86168515a5764ee587275b to your computer and use it in GitHub Desktop.
Save crowbarsolutions/d5ae9997bb86168515a5764ee587275b to your computer and use it in GitHub Desktop.
Deletes all reddit comments/posts/whatever on your user page
(function deleteComments() {
var deleteButtons = document.querySelectorAll('[data-event-action="delete"]');
[].forEach.call(deleteButtons, function(element) {
element.click();
});
var trigger = setInterval(function(){
var yesButton = document.querySelector('.yes');
if (yesButton === null) {
clearInterval(trigger);
var nextButton = document.querySelector('span.next-button > a');
if(nextButton !== null) {
nextButton.click();
deleteComments();
}
} else {
yesButton.click();
}
}, 750);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment