Last active
May 25, 2021 13:26
-
-
Save ckiee/c9ab861e4f98c50c20778da7bc0a38ad to your computer and use it in GitHub Desktop.
Add a nixpk.gs quick link on nixpkgs github PRs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub nixpk.gs | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description add a nixpk.gs quick link on nixpkgs github PRs | |
// @author ronthecookie <[email protected]> | |
// @match https://github.com/NixOS/nixpkgs/pull/* | |
// @icon https://www.google.com/s2/favicons?domain=github.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const bar = document.querySelector(".gh-header-meta"); | |
const bits = location.pathname.split("/"); | |
const id = bits[bits.length-1]; | |
bar.innerHTML += `<a href="https://nixpk.gs/pr-tracker.html?pr=${id}" target=_blank>View on nixpk.gs</a>`; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment