Skip to content

Instantly share code, notes, and snippets.

@SimonKocurek
Last active March 17, 2019 08:19
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