Skip to content

Instantly share code, notes, and snippets.

@satyr
Created January 30, 2011 13:19
Show Gist options
  • Save satyr/802853 to your computer and use it in GitHub Desktop.
Save satyr/802853 to your computer and use it in GitHub Desktop.
GitHub Issues Canonicalizer
// ==UserScript==
// @name GitHub Issues Canonicalizer
// @namespace http://about.me/satyr
// @include https://github.com/*/*/issues*
// ==/UserScript==
setTimeout(function(){
Array.forEach(document.links, function(a){
var m = /^#issue\/(\d+)$/.exec(a.hash)
if(m) a.href = /^.+\/issues\//.exec(a.pathname) + m[1]
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment