Skip to content

Instantly share code, notes, and snippets.

@hail2u
Created April 23, 2009 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hail2u/100442 to your computer and use it in GitHub Desktop.
Save hail2u/100442 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name His/Her Gists!
// @namespace http://hail2u.net/
// @description Insert a link to his/her Gists page in his/her profile page.
// @include http://github.com/*
// @exclude http://github.com/*/*
// ==/UserScript==
// console.time("hisher_gists");
// generate Gist URL
var gist_url = location.href.replace(/^http:\/\/github.com/, "http://gist.github.com");
// generate link for Gist
var gist_link = '<div class="field"><label>Gists:</label><div><a id="profile_blog" href="' + gist_url + '" class="url">' + gist_url + '</a></div></div>';
document.getElementsByClassName("info")[0].innerHTML += gist_link;
// console.timeEnd("hisher_gists");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment