Skip to content

Instantly share code, notes, and snippets.

@rmogstad
Last active December 28, 2016 03:28
Show Gist options
  • Save rmogstad/a70efda59a78d99f9153201e09bc8009 to your computer and use it in GitHub Desktop.
Save rmogstad/a70efda59a78d99f9153201e09bc8009 to your computer and use it in GitHub Desktop.
Load all Reddit comments
$( ".report-button" ).after('<li><a href="#" onclick="loadNextComment();">load all comments</a></li>')
loadNextComment = function() { commentLink=document.querySelectorAll("span[class=morecomments] a")[0]; if( commentLink != undefined) { commentLink.click(); setTimeout(function() { loadNextComment() }, 1000); } else { alert('All comments loaded!');} };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment