Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //add the repo data to the div using the template
- this.DisplayRepos = function(data)
- {
- //if we got properly formed data
- if(data.user != undefined)
- {
- var user = data.user;
- //for all the div objects that correspond to that user
- for(var j in GitHubRepos.displayObjects[user.login])
- {
- var proj_div = GitHubRepos.displayObjects[user.login][j];
- //for each of the user repositories in the data
- $.each(user.repositories, function(i, repo) {
- //add the templated information to the divs existing content
- proj_div.innerHTML = proj_div.innerHTML + format(REPO_TEMPLATE, repo.url, repo.name);
- });
- //the style div.github-projects is display: none by default
- //display it if there was no error message
- proj_div.style.display = "block";
- }
- }
- }
Add Comment
Please, Sign In to add comment