Skip to content

Instantly share code, notes, and snippets.

@Enerccio
Created April 17, 2023 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Enerccio/cffc01e52ac9320089b8c63bf919d17b to your computer and use it in GitHub Desktop.
Save Enerccio/cffc01e52ac9320089b8c63bf919d17b to your computer and use it in GitHub Desktop.
Script to delete mass posts from reddit (use old reddit style and RES to load more pages)
var timeInterval = 1500;
(function run(data) {
if (data && data[0]) {
var _this = $(data[0]);
setTimeout(function() {
_this.click();
run($('.del-button .option .yes'));
}, timeInterval);
} else {
data = $('.del-button .option .yes');
if (data && !Array.isArray(data.isArray)) {
data = [data];
}
if (data && data[0])
run(data);
else {
console.log("Done");
console.log(data);
}
}
})($('.del-button .option .yes'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment