Last active
December 28, 2016 03:28
-
-
Save rmogstad/a70efda59a78d99f9153201e09bc8009 to your computer and use it in GitHub Desktop.
Load all Reddit comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( ".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