github.js: fix a JSHint warning
This commit is contained in:
parent
e0434015fb
commit
1714cea928
|
@ -13,7 +13,7 @@ jQuery.fn.listCommits = function(username, repository, branch) {
|
|||
var githubUrl = 'https://github.com/' + username + '/' + repository + '/commit/' + this.sha;
|
||||
var shortMessage = cutLines(this.commit.message);
|
||||
var author = this.author.login;
|
||||
if (author == '') {
|
||||
if (author === '') {
|
||||
author = this.author.name;
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
/*! Inspired by: http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html */jQuery.fn.listCommits=function(e,t,n){function i(e){var t=e.indexOf("\n");return t>-1?e.slice(0,t):e}this.html("<span>Querying GitHub for recent commits…</span>");var r=this;$.getJSON("https://api.github.com/repos/"+e+"/"+t+"/commits?sha="+n+"&callback=?",function(n){var s=n.data,o=$('<ul class="rssfeeditems"/>');r.empty().append(o),$(s).each(function(n){var r="https://github.com/"+e+"/"+t+"/commit/"+this.sha,s=i(this.commit.message),u=this.author.login;u==""&&(u=this.author.name),o.append('<li><a href="'+r+'">'+s+"</a> <em>by <strong>"+u+"</strong></em></li>");if(n==9)return!1})})};
|
||||
/*! Inspired by: http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html */jQuery.fn.listCommits=function(e,t,n){function i(e){var t=e.indexOf("\n");return t>-1?e.slice(0,t):e}this.html("<span>Querying GitHub for recent commits…</span>");var r=this;$.getJSON("https://api.github.com/repos/"+e+"/"+t+"/commits?sha="+n+"&callback=?",function(n){var s=n.data,o=$('<ul class="rssfeeditems"/>');r.empty().append(o),$(s).each(function(n){var r="https://github.com/"+e+"/"+t+"/commit/"+this.sha,s=i(this.commit.message),u=this.author.login;u===""&&(u=this.author.name),o.append('<li><a href="'+r+'">'+s+"</a> <em>by <strong>"+u+"</strong></em></li>");if(n==9)return!1})})};
|
Loading…
Reference in New Issue