Skip to content

Instantly share code, notes, and snippets.

@rmogstad
rmogstad / gist:a70efda59a78d99f9153201e09bc8009
Last active December 28, 2016 03:28
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!');} };