Browse code

Updated Github API to V3.

Github API V2 has been removed. The response data format also changed.

Zhao Lü authored on 20/07/2012 at 05:09:48
Showing 1 changed files
... ...
@@ -3,7 +3,7 @@ var github = (function(){
3 3
     var i = 0, fragment = '', t = $(target)[0];
4 4
 
5 5
     for(i = 0; i < repos.length; i++) {
6
-      fragment += '<li><a href="'+repos[i].url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>';
6
+      fragment += '<li><a href="'+repos[i].html_url+'">'+repos[i].name+'</a><p>'+(repos[i].description||'')+'</p></li>';
7 7
     }
8 8
     t.innerHTML = fragment;
9 9
   }