Skip to content

Instantly share code, notes, and snippets.

@taizooo
Forked from hail2u/hisher_gists.user.js
Created November 19, 2009 02:54
Show Gist options
  • Save taizooo/238509 to your computer and use it in GitHub Desktop.
Save taizooo/238509 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(/^https?:\/\/github.com/, "https://gist.github.com");
// generate link for Gist
var gist_link = '<dl class="gist"><dt>Gists:</dt><dd><a id="profile_blog" href="' + gist_url + '" class="url">' + gist_url + '</a></dd></dl>';
document.getElementsByClassName("first")[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