Parse threads.
This commit is contained in:
parent
4be46aebdf
commit
d7ad4b8619
@ -627,11 +627,15 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
function Thread(root, board) {
|
function Thread(root, board) {
|
||||||
|
var postInfo;
|
||||||
this.root = root;
|
this.root = root;
|
||||||
this.board = board;
|
this.board = board;
|
||||||
this.ID = +root.id.slice(1);
|
this.ID = +root.id.slice(1);
|
||||||
this.hr = root.nextElementSibling;
|
this.hr = root.nextElementSibling;
|
||||||
this.posts = {};
|
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;
|
g.threads["" + board + "." + this] = board.threads[this] = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -491,6 +491,10 @@ class Thread
|
|||||||
@hr = root.nextElementSibling
|
@hr = root.nextElementSibling
|
||||||
@posts = {}
|
@posts = {}
|
||||||
|
|
||||||
|
postInfo = $ '.postInfo', root.firstElementChild
|
||||||
|
@isClosed = !!$ 'img[title=Closed]', postInfo
|
||||||
|
@isSticky = !!$ 'img[title=Sticky]', postInfo
|
||||||
|
|
||||||
g.threads["#{board}.#{@}"] = board.threads[@] = @
|
g.threads["#{board}.#{@}"] = board.threads[@] = @
|
||||||
|
|
||||||
class Post
|
class Post
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user