Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/js/neochan/board_init.js
Jeff Becker 536b1161c9 more
2016-12-31 08:36:28 -05:00

25 lines
589 B
JavaScript

/**
* @brief initialize a board page
*/
function neochan_board_init(root, board) {
var thread_init = function (j) {
var elem = document.createElement("div");
for(var idx = 0; idx < j.length; idx ++) {
var post = j[idx];
neochan_post_fadein(elem, post);
}
return elem;
}
// inject threads
onready(function() {
for (var idx = 0; idx < board.posts.length; idx ++) {
var posts = board.posts[idx];
var elem = thread_init(posts);
root.appendChild(elem);
}
});
}