Created
May 6, 2009 22:13
-
-
Save satyr/107780 to your computer and use it in GitHub Desktop.
Shows commit logs on Gist.
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 gist logs | |
// @namespace http://d.hatena.ne.jp/murky-satyr | |
// @description Shows commit logs on Gist. | |
// @include https://gist.github.com/* | |
// @license WTFPL | |
// ==/UserScript== | |
Array.forEach(document.querySelectorAll('#revisions .id'), function(a){ | |
GM_xmlhttpRequest({ | |
method: 'get', url: 'https://raw.github.com/gist'+ a.pathname +'/meta', | |
onload: function(r){ | |
if(/\n\n/.test(r.responseText)) | |
a.parentNode.appendChild(document.createElement('div')) | |
.textContent = RegExp["$'"] | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment