Skip to content

Instantly share code, notes, and snippets.

@yokoleia
Created February 5, 2019 01:12
Show Gist options
  • Save yokoleia/0a9a32513b0f7f5c8179f4d170882ce3 to your computer and use it in GitHub Desktop.
Save yokoleia/0a9a32513b0f7f5c8179f4d170882ce3 to your computer and use it in GitHub Desktop.
Reddit Mass Comment Delete
// go to old.reddit.com/user/me/comments
// paste into the console
// NOTE: this will delete all comments from page 2 to n.
// If there are less than 1 page worth of comments, or
// once all those comments are deleted, refresh, remove line 7 and re-run!
a = setInterval(
function () {
document.getElementsByClassName("ListingPagination__navButton")[1].click();
var elem = document.getElementsByClassName("CommentListing__comment");
for (var i = 0; i < 25; i++) {
elem[i].getElementsByClassName("CommentFlatList__item RestrictedFlatlistButton")[0].click();
elem[i].getElementsByClassName("RestrictedFlatlistButton__toggleOption")[0].click();
}
}, 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment