Parse threads.

This commit is contained in:
Nicolas Stepien 2012-08-31 02:49:16 +02:00
parent 4be46aebdf
commit d7ad4b8619
2 changed files with 8 additions and 0 deletions

View File

@ -627,11 +627,15 @@
};
function Thread(root, board) {
var postInfo;
this.root = root;
this.board = board;
this.ID = +root.id.slice(1);
this.hr = root.nextElementSibling;
this.posts = {};
postInfo = $('.postInfo', root.firstElementChild);
this.isClosed = !!$('img[title=Closed]', postInfo);
this.isSticky = !!$('img[title=Sticky]', postInfo);
g.threads["" + board + "." + this] = board.threads[this] = this;
}

View File

@ -491,6 +491,10 @@ class Thread
@hr = root.nextElementSibling
@posts = {}
postInfo = $ '.postInfo', root.firstElementChild
@isClosed = !!$ 'img[title=Closed]', postInfo
@isSticky = !!$ 'img[title=Sticky]', postInfo
g.threads["#{board}.#{@}"] = board.threads[@] = @
class Post