Overboard compatibility.
This commit is contained in:
parent
7a37c7cad0
commit
616f27963f
@ -10,7 +10,7 @@ Get =
|
||||
excerpt
|
||||
threadFromRoot: (root) ->
|
||||
return null unless root?
|
||||
g.threads["#{g.BOARD}.#{root.id.match(/\d*$/)[0]}"]
|
||||
g.threads["#{root.dataset.board or g.BOARD.ID}.#{root.id.match(/\d*$/)[0]}"]
|
||||
threadFromNode: (node) ->
|
||||
Get.threadFromRoot $.x "ancestor-or-self::#{Site.xpath.thread}", node
|
||||
postFromRoot: (root) ->
|
||||
|
||||
@ -304,14 +304,18 @@ Main =
|
||||
posts = []
|
||||
|
||||
for threadRoot in $$(s.thread, board)
|
||||
thread = new Thread +threadRoot.id.match(/\d*$/)[0], g.BOARD
|
||||
boardObj = if (boardID = threadRoot.dataset.board)
|
||||
g.boards[boardID] or new Board(boardID)
|
||||
else
|
||||
g.BOARD
|
||||
thread = new Thread +threadRoot.id.match(/\d*$/)[0], boardObj
|
||||
thread.nodes.root = threadRoot
|
||||
threads.push thread
|
||||
postRoots = $$ s.postContainer, threadRoot
|
||||
postRoots.unshift threadRoot if Site.isOPContainerThread
|
||||
for postRoot in postRoots when $(s.comment, postRoot)
|
||||
try
|
||||
posts.push new Post postRoot, thread, g.BOARD
|
||||
posts.push new Post postRoot, thread, thread.board
|
||||
catch err
|
||||
# Skip posts that we failed to parse.
|
||||
unless errors
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user