// Usage: // declare GITHUB_USERNAME in your javascript section // and insert
into html // finally require this file and jquery.js if (typeof jQuery == 'undefined') { document.write(''); } document.write(''); function loadGitHubJson(data) { user = data["user"] $("#github-badge").empty().append( "
" + "" + user["login"] + "" + "'s Project" + "
" + "
" + "
" + "" + "
" + "
" + "" ); $.each(user["repositories"], function(){ if (this['private'] == false) { $("#github-badge .body .repos_listing").append( "
  • " + "public" + "" + this["name"] + "" + "" + "
  • " ) } }); $("#github-badge .clickable img").click(function(){ var target = $(this).parents()[0]; $(target).children(".description").toggle() }); } $(function(){ $.getScript("http://github.com/api/v1/json/" + GITHUB_USERNAME +"?callback=loadGitHubJson") });