Fixed #20
This commit is contained in:
File diff suppressed because one or more lines are too long
4
main.js
4
main.js
@@ -157,7 +157,7 @@ function addComment(avatar, name, content, date) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var tr = document.createElement('tr');
|
var tr = document.createElement('tr');
|
||||||
tr.innerHTML = '<th>' + (document.getElementById('configCommentList').childElementCount + 1) + '</th><th>' + name + '</th><th>' + content + '</th><th>' + date.toLocaleString() + '</th>';
|
tr.innerHTML = '<th>' + commentList.length + '</th><th>' + name + '</th><th>' + content + '</th><th>' + date.toLocaleString() + '</th>';
|
||||||
document.getElementById('configCommentList').append(tr);
|
document.getElementById('configCommentList').append(tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ function addComment(avatar, name, content, date) {
|
|||||||
function removeComment() {
|
function removeComment() {
|
||||||
if (commentList.length) {
|
if (commentList.length) {
|
||||||
commentList.pop();
|
commentList.pop();
|
||||||
document.getElementById('configCommentList').removeChild(document.getElementById('configCommentList').childNodes[document.getElementById('configCommentList').childElementCount]);
|
document.getElementById('configCommentList').removeChild(document.getElementById('configCommentList').lastChild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user