Created
April 29, 2016 14:54
-
-
Save nkmathew/f331af23ab977c8f7af9da4ad43df48b to your computer and use it in GitHub Desktop.
Greasemonkey script for easily jumping to a user's gist page from the main page using the "gist" link at the top of the page
This file contains hidden or 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 Gist Jumper | |
// @description Enables you to go to a users' gist page using the normal 'gist' link | |
// @author nkmathew | |
// @namespace http://nkmathew.net | |
// @include https://github.com/* | |
// @version 0.1.0 | |
// @grant GM_getValue | |
// @grant GM_setValue | |
// ==/UserScript== | |
gistLink = document.querySelectorAll('.header-nav-link')[2]; | |
username = window.location.pathname.split('/')[1]; | |
gistLink.href = 'https://gist.github.com/' + username; | |
gistLink.innerHTML = username + "'s gists"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment