Google Chrome Extension: Reddit All Comments Viewer (Expand all comments in Reddit)

Published: by

  • Categories:

Ever noticed those "load more comments" button, this extension expands all those links.

Please note that use this feature judiciously as it increases the load on reddit servers and that was the primary reason not all comments are displayed by default.

The idea behind developing:- It was a top-post with more than 2000 comments. I had read a comment earlier but later when I reopend the link to search for that comment with the keyword (Yes, I remembered the keywork to search for the comment), it wasn't on the page. The sole reason for this was it being not shown due to "load more comments".

Link to the Extension at Web Store:


Content Script used:

function runAgain(){
	//Run every one second

function addButton(){
	//All buttons have class as "button"
	var first_button = document.getElementsByClassName("button")[0];
	if (first_button == null){
		alert("Sorry, no comments to expand");

	if (first_button.innerHTML == "loading..."){
		first_button.className = ""; //To fix later
	   var theEvent = document.createEvent("MouseEvent");
	   theEvent.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);


//Link created and added as child to "pane"
var pane = document.getElementsByClassName("panestack-title")[0];
var newlink = document.createElement("a");
newlink.appendChild(document.createTextNode("Load all comments")); = "loadmorecomments";
newlink.href = "javascript:void(0)";
newlink.className="title-button ";
newlink.title = 'Opens all "load more comments" link every 1 second';
newlink.addEventListener('click', runAgain, false);