diff options
| author | Alexis Jacomy <alexis.jacomy@gmail.com> | 2011-06-21 16:13:11 +0200 |
|---|---|---|
| committer | Alexis Jacomy <alexis.jacomy@gmail.com> | 2011-06-21 16:13:11 +0200 |
| commit | 90c4ef6771eefcf1a39cccf8b2edd21abc6e0bda (patch) | |
| tree | e4707f906f54b49cfb70ac8a1c04071dece807b2 /public | |
| parent | Alexi spelling mistake corrected in about.tt (diff) | |
| download | stargit-90c4ef6771eefcf1a39cccf8b2edd21abc6e0bda.tar.gz | |
Default graph displayed is Github's neighborhoodmaster
Diffstat (limited to 'public')
| -rw-r--r-- | public/javascripts/stargit.js | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/public/javascripts/stargit.js b/public/javascripts/stargit.js index e470298..336b899 100644 --- a/public/javascripts/stargit.js +++ b/public/javascripts/stargit.js @@ -322,13 +322,19 @@ var stargit=(function(){ } }, - onFlashReady: function(){ - var userNameFromAnchor = window.location.hash.substring(1); - - if(userNameFromAnchor){ - getGithubGraph(userNameFromAnchor); - document.getElementById("query_input").value = userNameFromAnchor; - } - } + onFlashReady: function(){ + var userNameFromAnchor = window.location.hash.substring(1); + + if(userNameFromAnchor){ + getGithubGraph(userNameFromAnchor); + document.getElementById("query_input").value = userNameFromAnchor; + }else{ + var defaultQuery = "github"; + + getGithubGraph(defaultQuery); + window.location.hash = defaultQuery; + document.getElementById("query_input").value = defaultQuery; + } + } }; })(); |
