Created
June 1, 2012 15:38
-
-
Save remi/2853033 to your computer and use it in GitHub Desktop.
Sort GitHub user repositories based on watchers count
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
// Use this bookmarklet on a user page, eg. https://github.com/remiprev | |
$(".repo_list").children().map(function() { return $(this); }).sort(function(a,b) { a = parseInt(a.find(".watchers").text()); b = parseInt(b.find(".watchers").text()); if (a <= b) { return 1; } else { return -1 } }).each(function(i, repo) { $(".repo_list").append(repo) }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment