Skip to content

Instantly share code, notes, and snippets.

@Vocaned
Last active September 15, 2025 00:17
Show Gist options
  • Select an option

  • Save Vocaned/7dacb8bc5bb822a65a76f1dfa8ced08c to your computer and use it in GitHub Desktop.

Select an option

Save Vocaned/7dacb8bc5bb822a65a76f1dfa8ced08c to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Unexpire Github Artifacts
// @version 1.0.3
// @description Download "expired" github artifacts less than 3 months old
// @match https://github.com/*
// @author voc
// @namespace https://github.com/Vocaned
// @downloadURL https://gist.github.com/Vocaned/7dacb8bc5bb822a65a76f1dfa8ced08c/raw/unexpire-github-artifacts.user.js
// @grant none
// @run-at document-end
// ==/UserScript==
(() => {
const observer = new MutationObserver(_ => {
if (document.querySelector('meta[name="route-controller"]')?.content !== 'actions_workflow_runs') return;
for (const el of document.querySelectorAll('code[id^="artifact-"][id$="-hash"]')) {
const id = el.id.match(/artifact-([^-]+)-hash/)[1];
const artifact = el.closest('tr');
if (artifact.querySelector('.color-fg-muted') === null) continue;
artifact.querySelectorAll('*').forEach(child => {
child.classList.remove('border-bottom', 'color-border-muted', 'color-fg-muted');
});
const span = artifact.querySelector('.text-bold');
const dl = document.createElement('a');
dl.href = location.pathname + "/artifacts/" + id;
span.parentNode.insertBefore(dl, span);
dl.appendChild(span);
}
});
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