Skip to content

Instantly share code, notes, and snippets.

@andrhamm
Created September 6, 2017 20:50
Show Gist options
  • Select an option

  • Save andrhamm/cf0fd3d9cc63af0dd1d5c05cb5320494 to your computer and use it in GitHub Desktop.

Select an option

Save andrhamm/cf0fd3d9cc63af0dd1d5c05cb5320494 to your computer and use it in GitHub Desktop.

Revisions

  1. andrhamm created this gist Sep 6, 2017.
    17 changes: 17 additions & 0 deletions delete-reddit-history.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // Load user profile page, if using RES scroll so many comments are loaded onto the page
    // then enter the following in the browser's developer console.
    // it will delete 1 post/comment every 1500ms

    var $domNodeToIterateOver = $('.del-button .option .yes'),
    currentTime = 0,
    timeInterval = 1500;

    $domNodeToIterateOver.each(function() {

    var _this = $(this);
    currentTime = currentTime + timeInterval;

    setTimeout(function() {
    _this.click();
    }, currentTime);
    });