Skip to content

Instantly share code, notes, and snippets.

@satyr
Created May 6, 2009 22:13
Show Gist options
  • Save satyr/107780 to your computer and use it in GitHub Desktop.
Save satyr/107780 to your computer and use it in GitHub Desktop.
Shows commit logs on Gist.
// ==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