Skip to content

Instantly share code, notes, and snippets.

@DelofJ
Last active July 1, 2024 11:53
Show Gist options
  • Save DelofJ/a81c27f473045bb01b50c3dc6ca51a2f to your computer and use it in GitHub Desktop.
Save DelofJ/a81c27f473045bb01b50c3dc6ca51a2f to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name GitHub Artifacts login bypass
// @description Allows you to download an artifact from GitHub or web archive using nightly.link
// @author DelofJ
// @version 1.0
// @namespace https://gist.github.com/DelofJ/a81c27f473045bb01b50c3dc6ca51a2f
// @icon https://github.githubassets.com/favicons/favicon.png
// @downloadURL https://gist.githubusercontent.com/DelofJ/a81c27f473045bb01b50c3dc6ca51a2f/raw/e59e6323aef2072b8a24839dc2dcc04f80b3c109/github-artifact-redirect.user.json
// @updateURL https://gist.githubusercontent.com/DelofJ/a81c27f473045bb01b50c3dc6ca51a2f/raw/e59e6323aef2072b8a24839dc2dcc04f80b3c109/github-artifact-redirect.user.json
// @grant none
// @match https://github.com/*/*/suites/*/artifacts/*
// @match https://web.archive.org/web/*/https://github.com/*/*/suites/*/artifacts/*
// ==/UserScript==
let artifact_name = document.location.pathname.substring(document.location.pathname.lastIndexOf('/')+1)
document.location.href = document.location.href.replace("github.com", "nightly.link").split("suites")[0] + "actions/artifacts/" + artifact_name + ".zip"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment