This repository has been archived by the owner on Oct 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize JS code to stick to StandardJS code style
- Loading branch information
alljp
committed
Oct 9, 2018
1 parent
debb40f
commit 3ae3279
Showing
1 changed file
with
25 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,30 @@ | ||
var users = [] | ||
var i = 0; | ||
var i = 0 | ||
|
||
var getData = (function($){ | ||
var URL = "https://api.github.com/repos/Showndarya/Hacktoberfest/contributors" | ||
|
||
$.get(URL,function(data,status) { | ||
var getData = (function ($) { | ||
var URL = 'https://api.github.com/repos/Showndarya/Hacktoberfest/contributors' | ||
|
||
data.forEach(function(d) { | ||
|
||
if(d.login==null){ | ||
return true; | ||
} | ||
|
||
if(users.indexOf(d.url) == -1) { | ||
|
||
var template = | ||
"<div class='col-md-3 col-xs-6 col-lg-3' id='author'><div class='container-fluid'>" + | ||
"<a class='thumbnail' target='_blank' href='" + d.html_url + "'>" + | ||
"<img src='" + d.avatar_url + "' alt='' class='img-responsive'>" + | ||
"</a>" + | ||
"<div class='caption'>" + | ||
"<strong>" + d.login + "</strong>" + | ||
"<p> Contributions: " + d.contributions + "</p>"+ | ||
"</div></div></div>" | ||
|
||
$('#contributors').append(template); | ||
users[i] = d.url; | ||
i=i+1; | ||
} | ||
|
||
}); | ||
|
||
}); | ||
$.get(URL, function (data, status) { | ||
data.forEach(function (d) { | ||
if (d.login == null) { | ||
return true | ||
} | ||
|
||
if (users.indexOf(d.url) == -1) { | ||
var template = | ||
"<div class='col-md-3 col-xs-6 col-lg-3' id='author'><div class='container-fluid'>" + | ||
"<a class='thumbnail' target='_blank' href='" + d.html_url + "'>" + | ||
"<img src='" + d.avatar_url + "' alt='' class='img-responsive'>" + | ||
'</a>' + | ||
"<div class='caption'>" + | ||
'<strong>' + d.login + '</strong>' + | ||
'<p> Contributions: ' + d.contributions + '</p>' + | ||
'</div></div></div>' | ||
|
||
})($); | ||
$('#contributors').append(template) | ||
users[i] = d.url | ||
i = i + 1 | ||
} | ||
}) | ||
}) | ||
})($) |