Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Commit

Permalink
Standardize JS code to stick to StandardJS code style
Browse files Browse the repository at this point in the history
  • Loading branch information
alljp committed Oct 9, 2018
1 parent debb40f commit 3ae3279
Showing 1 changed file with 25 additions and 32 deletions.
57 changes: 25 additions & 32 deletions Contributors_Page_Source/index.js
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
}
})
})
})($)

0 comments on commit 3ae3279

Please sign in to comment.