GitHub PR Expand Everything

Automatically expand hidden PR comments and review threads

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         GitHub PR Expand Everything
// @version      2026-06-11
// @description  Automatically expand hidden PR comments and review threads
// @match        https://github.com/*/*/pull/*
// @run-at       document-idle
// @license      MIT
// @namespace https://greasyfork.org/users/1611379
// ==/UserScript==

(function () {
    'use strict';

    function expandEverything() {
        for (const button of document.querySelectorAll('button')) {
            const text = button.textContent?.trim() ?? '';

            if (text.includes('Load more') && !button.closest('a')) {
                setTimeout(() => button.click(), 100);
            }
        }
    }

    const observer = new MutationObserver(() => {
        expandEverything();
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true,
    });

    expandEverything();
})();