Archived
1
0
This commit is contained in:
Jeff Becker 2017-09-30 08:40:18 -04:00
parent 796d3480ba
commit d6bbe584de
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -54,10 +54,18 @@ var reloadThreadJSON = function() {
if(ajax.status == 404) {
console.log("thread gone");
} else if (ajax.status == 200) {
var rootelem = document.getElementById("thread_"+window.location.pathname.split("/")[2]);
var posts = JSON.parse(ajax.responseText);
for(var idx = 0; idx < posts.length; idx ++ )
{
var id = posts[idx].HashLong;
var e = document.getElementById(id);
if(!e) {
e = document.createElement("div");
e.innerHTML = posts[idx].PostMarkup;
rootelem.appendChild(e.childNodes[0]);
e.remove();
}
}
}
}