Expand All LinkedIn Comments

Expand All LinkedIn Comments

Sometimes I want to see all of the comments in a LinkedIn thread, for example to paste it into ChatGPT (or print and save it as a PDF and upload that) for analysis.

Previously published to: https://deliverystack.net/2025/11/10/expand-all-linkedin-comments/

To do this, first create a bookmarklet that will expand all the "More..." links for long comments. I got instructions and code here:

Register the bookmarklet (do this only once). For example, in Chrome:

  1. Press Ctrl+Shft+O to show the bookmark manager.
  2. Click the three dots at the top right to show the bookmark manager menu.
  3. Add a new bookmark named something like "Expand LinkedIn Comments" with the following for URL (code copied from adsmiths page linked above)):
javascript:(function(){function simulatePointerClick(el){if(!el)return;el.focus();["pointerover","pointerenter","pointerdown","pointerup","click"].forEach(evtName=>{var pe=new PointerEvent(evtName,{bubbles:true,cancelable:true,pointerType:"mouse",view:window});el.dispatchEvent(pe)})}function clickMoreButtons(){var buttons=document.querySelectorAll("button.feed-shared-inline-show-more-text__see-more-less-toggle");buttons.forEach(button=>{if(button.offsetParent===null)return;var span=button.querySelector("span");if(span){var txt=span.textContent.trim().toLowerCase();if(txt.indexOf("more")!==-1&&txt.indexOf("less")===-1){button.scrollIntoView({behavior:"smooth",block:"center"});setTimeout(()=>{console.log("Clicking button:",button);simulatePointerClick(button)},300)}}})}clickMoreButtons();var observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.addedNodes.forEach(node=>{if(node.nodeType===Node.ELEMENT_NODE){if(node.matches&&node.matches("button.feed-shared-inline-show-more-text__see-more-less-toggle")){setTimeout(()=>{console.log("Clicking newly added button:",node);simulatePointerClick(node)},300)}else{var btns=node.querySelectorAll?node.querySelectorAll("button.feed-shared-inline-show-more-text__see-more-less-toggle"):[];btns.forEach(btn=>{setTimeout(()=>{console.log("Clicking newly added button (subtree):",btn);simulatePointerClick(btn)},300)})}}})})});oadsmithsbserver.observe(document.body,{childList:true,subtree:true});var interval=setInterval(clickMoreButtons,1000);setTimeout(()=>{clearInterval(interval);observer.disconnect();console.log("Stopped auto-clicking more buttons.")},300000)})();

When you access this bookmarklet, the browser should invoke this JavaScript, which should expand all of the "More..." links.

Then:

  1. Go to the LinkedIn post that you want to see.
  2. Click "Most relevent" and change it to "Most recent" so that LinkedIn will allow all of the comments to loads.
  3. Repeatedly scroll to the bottom of the page until all comments load.
  4. Press Ctrl+Shift+B to show the bookmarks bar, or otherwise trigger the bookmarklet.

Someone that knows front-end coding could probably add steps 2 and 3 to the bookmarklet.