diff --git a/site/js/main.js b/site/js/main.js
index e9152f0c41..0851c951ea 100644
--- a/site/js/main.js
+++ b/site/js/main.js
@@ -15,24 +15,28 @@
});
// Contributor list
- $.getJSON('https://api.github.com/repos/addyosmani/todomvc/contributors?callback=?', function( res ) {
- var data = res.data;
+ $.ajaxSetup({
+ cache: true
+ });
+ $.getJSON('https://github.com/api/v2/json/repos/show/addyosmani/todomvc/contributors?callback=?', function( res ) {
+ var data = res.contributors;
// Add some previous contributors not on the GitHub list
- /*
[].push.apply(data, [{
- login: 'test'
+ login: 'tomdale',
+ name: 'Tom Dale'
}, {
- login: 'test'
+ login: 'justinbmeyer',
+ name: 'Justin Meyer'
}, {
- login: 'test'
+ login: 'maccman',
+ name: 'Alex MacCaw'
}]);
- */
- var ret = $.map( res.data, function( elem ) {
+ var ret = $.map( data, function( elem ) {
var username = elem.login;
if ( $.inArray( username, [ 'addyosmani', 'boushley', 'sindresorhus' ] ) >= 0 ) {
return;
}
- return '' + username + '';
+ return '' + ( elem.name || username ) + '';
});
$('#contributor-list').show().children('span').html( ret.join(', ') );
});