- Copy the text in bookmark.js
- In your browser, create a new bookmark and paste the copied text into the "URL" field of the bookmark.
- Navigate to a GitHub user/organization repository list and click on your newly created bookmark
- Repository counts will appear under the various repository filters
- UDATE 4/11/14: Now gives valid counts on front page
Last active
August 29, 2015 13:58
-
-
Save itsananderson/9968400 to your computer and use it in GitHub Desktop.
Shows repo counts in GitHub repository list
This file contains hidden or 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
javascript:(function(){ | |
/* detect frontpage list */ | |
if ($('.more-repos-link').length != 0) { | |
$.get('/dashboard/ajax_your_repos', function(response) { | |
$('#repo_listing').html(response); | |
$('.more-repos').remove(); | |
repoCount(); | |
}, 'text'); | |
} else { | |
repoCount(); | |
} | |
function repoCount() { | |
$('.js-repo-filter-tab').each(function() { | |
var $this = $(this); | |
var repolist = $('.repolist, #repo_listing').find($this.attr('data-filter')); | |
$this.html($this.text() + '<p style="text-align: center; margin: 0">(' + repolist.length + ')</p>'); | |
}); | |
$('.repo_filterer').css("margin-top", 0); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment