Created
April 23, 2009 10:28
-
-
Save hail2u/100442 to your computer and use it in GitHub Desktop.
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 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