Automatically expand hidden PR comments and review threads
// ==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();
})();