Skip to content

Instantly share code, notes, and snippets.

@nkmathew
Created April 29, 2016 14:54
Show Gist options
  • Save nkmathew/f331af23ab977c8f7af9da4ad43df48b to your computer and use it in GitHub Desktop.
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
// ==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