Created
December 22, 2014 06:19
-
-
Save uzimith/0a72cd470a076c4fbb1d to your computer and use it in GitHub Desktop.
create gist link in github profile.
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_link | |
// @namespace http://github.com/uzimith | |
// @include https://github.com/* | |
// @include http://github.com/* | |
// ==/UserScript== | |
(function () { | |
console.log("test"); | |
var vcardLi = document.querySelector('.vcard-details li'); | |
var url = 'http://gist.github.com' + location.pathname; | |
var content = [ | |
'<span class="octicon octicon-link"></span>', | |
'<a href="' + url + '" class="url" rel="nofollow me">' + url + '</a>', | |
].join('\n'); | |
var li = vcardLi.cloneNode(true); | |
li.innerHTML = content; | |
vcardLi.parentNode.appendChild(li); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment