Skip to content

Instantly share code, notes, and snippets.

@sheeeng
Created May 21, 2025 12:25
Show Gist options
  • Save sheeeng/e9f1ef707dfcd4fc7a0efe3ba61172f1 to your computer and use it in GitHub Desktop.
Save sheeeng/e9f1ef707dfcd4fc7a0efe3ba61172f1 to your computer and use it in GitHub Desktop.
GitHub Actions - Automatically Expand Summaries / ViolentMonkey / ViolentMonkeyScripts
// ==UserScript==
// @name GitHub Actions - Automatically Expand Summaries
// @namespace ViolentMonkeyScripts
// @version 1.0
// @description Automatically clicks all "Load summary" links on GitHub Actions run pages.
// @author Leonard Lee
// @match https://github.com/*/actions/runs/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
function clickLoadSummaryButtons() {
const buttons = Array.from(document.querySelectorAll('button'))
.filter(btn => btn.textContent.trim().toLowerCase() === 'load summary');
buttons.forEach(btn => {
if (!btn.disabled) {
btn.click();
}
});
}
// Run once on load
clickLoadSummaryButtons();
// Observe for dynamically loaded content
const observer = new MutationObserver(() => {
clickLoadSummaryButtons();
});
observer.observe(document.body, {
childList: true,
subtree: true
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment