(function($){"use strict";function debug(msg){console.log("github:",msg)}function iso8601(date){var year=date.getFullYear(),month=""+date.getMonth()+1,day=""+date.getDate();return year+"-"+(1==month.length?"0"+month:month)+"-"+ +(1==day.length?"0"+day:day)}function ago(date){function pl(qt,unit){var m=Math.ceil(diff/qt),u=unit;return m>1&&(u+="s"),m+" "+u+" ago"}var diff=Date.now()-date.getTime();return 6e4>diff?"less than a minute ago":(diff=Math.ceil(diff/1e3),3600>diff?pl(60,"minute"):86400>diff?pl(3600,"hour"):2678400>diff?pl(86400,"day"):31536e3>diff?pl(2678400,"month"):pl(31536e3,"year"))}function getRepos(cb){var repos=[];$.ajax({url:api_base+"/users/"+settings.user+"/repos",success:function(data){if(!(data instanceof Array))return cb(repos),void 0;for(var i=0;data.length>i;i++){var repo=data[i];repos.push({name:repo.name,url:repo.html_url})}cb(repos)}})}function getCommits(repos,cb){function lower(){0==--bar&&complete()}function complete(){commits.sort(function(a,b){return b.date.getTime()-a.date.getTime()}),cb(commits.slice(0,settings.display))}var commits=[],bar=repos.length,since=iso8601(new Date(Date.now()-262974e4));$.each(repos,function(i,repo){$.ajax({url:api_base+"/repos/"+settings.user+"/"+repo.name+"/commits",data:{since:since},success:function(data){if(!(data instanceof Array))return lower(),void 0;for(var i=0;data.length>i;i++){var commit=data[i];commits.push({repo:repo,user:{name:commit.author.login,avatar:commit.author.avatar_url,url:"https://github.com/"+commit.author.login},msg:commit.commit.message,sha:commit.sha,url:"https://github.com/"+settings.user+"/"+repo.name+"/commit/"+commit.sha,tree:"https://github.com/"+settings.user+"/"+repo.name+"/tree/"+commit.sha,date:new Date(Date.parse(commit.commit.author.date))})}lower()}})})}var api_base="https://api.github.com",settings={display:5,user:null};$.fn.github=function(options){var $this=this;for(var key in settings)options.hasOwnProperty(key)&&options[key]!==void 0&&(settings[key]=options[key]);return settings.user?(debug(settings),getRepos(function(repos){debug(repos),getCommits(repos,function(commits){debug(commits);for(var html='<table class="table table-bordered table-striped table-condensed"><tr><td colspan="3" style="text-align:center"><i class="icon-github" style="position:relative;top:3.5px"></i> :<small class="muted"><b>stream</b> /</small> <small><a href="https://github.com/'+settings.user+'">'+settings.user+"</a></small>"+"</td>"+"</tr>",i=0;commits.length>i;i++){var commit=commits[i];html+='<tr><td style="width:36px"><img src="'+commit.user.avatar+'" class="img-rounded" '+'style="height:36px;width:36px" />'+"</td>"+'<td style="border-left:0">'+'<a style="color:#000" href="'+commit.url+'" target="_blank"><strong>'+commit.msg+"</strong></a><br />"+'<div class="visible-desktop"><small><a href="'+commit.user.url+'" target="_blank">'+commit.user.name+'</a> <span class="muted">'+ago(commit.date)+" to </span>"+'<a href="'+commit.repo.url+'">'+commit.repo.name+"</a></small>"+"</div>"+"</td>"+'<td style="border-left:0;text-align:right">'+'<a href="'+commit.url+'" target="_blank"><span class="badge" style="font-weight:regular">'+commit.sha.substring(0,10)+"</span></a><br />"+'<small><a class="muted" target="_blank" href="'+commit.tree+'"><strong>Browse code &raquo;</strong>'+"</a></small>"+"</td>"+"</tr>"}html+="</table>",$this.html(html)})}),void 0):(console.error("github: please provide username"),void 0)}})(jQuery);
@@ -684,16 +684,32 @@
 /repos%22,
+dataType:%22json%22,
 success:
@@ -1275,16 +1275,32 @@
 :since%7D,
+dataType:%22json%22,
 success:
@@ -2284,123 +2284,21 @@
 r%22%3E%3C
-i class=%22icon-github%22 style=%22position:relative;top:3.5px%22%3E%3C/i%3E :%3Csmall class=%22muted%22%3E%3Cb%3Estream%3C/b%3E /%3C/small%3E %3Csmall
+small%3E%3Cstrong
 %3E%3Ca 
@@ -2358,24 +2358,47 @@
 s.user+%22%3C/a%3E
+ &bull; GitHub%3C/strong%3E
 %3C/small%3E%22+%22%3C

add new build