Fixed a bug with the GitHub history
This commit is contained in:
@@ -29,20 +29,23 @@ function addGitHistory(data) {
|
|||||||
" <a href=" +
|
" <a href=" +
|
||||||
url +
|
url +
|
||||||
" target='_blanc'>(Link)</a>"
|
" target='_blanc'>(Link)</a>"
|
||||||
document.getElementById("log").appendChild(new_li)
|
var log = document.getElementById("log")
|
||||||
|
log.appendChild(new_li)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send HTTP request to the GitHub API to get information about this repo
|
// Send HTTP request to the GitHub API to get information about this repo
|
||||||
const Http = new XMLHttpRequest()
|
function getGitHubAPIData() {
|
||||||
Http.open("GET", GIT_URL)
|
const Http = new XMLHttpRequest()
|
||||||
Http.send()
|
Http.open("GET", GIT_URL)
|
||||||
|
Http.send()
|
||||||
|
|
||||||
// If the API responds call the addGitHistory function
|
// If the API responds call the addGitHistory function
|
||||||
Http.onreadystatechange = function() {
|
Http.onreadystatechange = function() {
|
||||||
if (this.readyState === 4 && this.status === 200) {
|
if (this.readyState === 4 && this.status === 200) {
|
||||||
addGitHistory(JSON.parse(Http.responseText))
|
addGitHistory(JSON.parse(Http.responseText))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user