Can't really determine branch of js-select-button, GitHub trim long branch name in it; reverse to full determination

This commit is contained in:
Buu Nguyen 2014-05-17 09:48:16 -07:00
parent 0be2b202e9
commit 1fb23f22d0
1 changed files with 3 additions and 1 deletions

View File

@ -90,7 +90,9 @@
// Not a code page, skip
if (match[3] && !~['tree', 'blob'].indexOf(match[3])) return false
var branch = $('*[data-master-branch] > .js-select-button').text() || 'master'
var branch = $('*[data-master-branch]').data('ref') ||
$('*[data-master-branch] > .js-select-button').text() ||
'master'
return {
username : match[1],
reponame : match[2],