Parse threads.
This commit is contained in:
parent
4be46aebdf
commit
d7ad4b8619
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user