diff --git a/htdocs/site/js/github.js b/htdocs/site/js/github.js
index 66901f640..e4ff10b3f 100644
--- a/htdocs/site/js/github.js
+++ b/htdocs/site/js/github.js
@@ -12,13 +12,14 @@ jQuery.fn.listCommits = function(username, repository, branch) {
var target = this;
$.getJSON('https://api.github.com/repos/' + username + '/' + repository + '/commits?sha=' + branch + '&callback=?', function(response) {
- var commits = response.data,
- list = $('
');
+ var commits = response.data;
+ var list = $('');
+
target.empty().append(list);
$(commits).each(function(i) {
- var githubUrl = 'https://github.com/' + username + '/' + repository + '/commit/' + this.sha,
- shortMessage = htmlEntities(cutLines(this.commit.message));
+ var githubUrl = 'https://github.com/' + username + '/' + repository + '/commit/' + this.sha;
+ var shortMessage = htmlEntities(cutLines(this.commit.message));
if (this.author !== null) {
list.append('' + shortMessage + ' by ' + this.author.login + '');