Last active
March 17, 2019 08:19
-
-
Save SimonKocurek/50e1e69eb49cc8205c71195c9fe91c8f to your computer and use it in GitHub Desktop.
Reddit comment deletion script
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
$('a').filter(function() { | |
return $(this).text() === 'delete' | |
}).each(function() { | |
this.click() | |
}) | |
links = $('a').filter(function() { | |
return $(this).attr('onclick') === 'change_state(this, "del", hide_thing, undefined, null)' | |
}) | |
for (i = 0; i < links.length; i++) { | |
setTimeout(function(i) { | |
links[i].click() | |
}, i * 500, i) | |
} | |
setTimeout(function() { | |
window.location = $('a').filter(function() { | |
return $(this).text() === 'next ›' | |
}).attr('href') | |
}, links.length * 500 + 500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Utility for batch deleting comments on old Reddit design.