Skip to content

Instantly share code, notes, and snippets.

@SimonKocurek
Last active March 17, 2019 08:19
Show Gist options
  • Save SimonKocurek/50e1e69eb49cc8205c71195c9fe91c8f to your computer and use it in GitHub Desktop.
Save SimonKocurek/50e1e69eb49cc8205c71195c9fe91c8f to your computer and use it in GitHub Desktop.
Reddit comment deletion script
$('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)
@SimonKocurek
Copy link
Author

Utility for batch deleting comments on old Reddit design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment