Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
// ==UserScript==
// @name gist: replace title with filename
// @namespace http://d.hatena.ne.jp/youpy/
// @include http://gist.github.com/*
// @exclude http://gist.github.com/gists
// @require http://gist.github.com/3242.txt
// ==/UserScript==
(function() {
var username = $X('id("owner")//a')[0].textContent;
var filenames = $X('(//a|//span)[parent::div[@class="info"]]').map(
function(span) {
return span.textContent.replace(/ #$/,'');
}
);
if(filenames.length) {
document.title = document.title.
replace(/^(gist: \d+)/,
'$1 (' + filenames.join(', ') + ') by ' + username);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.