Add threadID and boardID to regular post object to make it more compatible with Build.parseJSON output.
This commit is contained in:
parent
34534985e3
commit
8c6424f512
@ -109,10 +109,9 @@ Filter =
|
|||||||
test: (post, hideable=true) ->
|
test: (post, hideable=true) ->
|
||||||
hl = undefined
|
hl = undefined
|
||||||
top = false
|
top = false
|
||||||
boardID = if post.board then post.board.ID else post.boardID
|
|
||||||
for key of Filter.filters when ((value = Filter[key] post)?)
|
for key of Filter.filters when ((value = Filter[key] post)?)
|
||||||
# Continue if there's nothing to filter (no tripcode for example).
|
# Continue if there's nothing to filter (no tripcode for example).
|
||||||
for filter in Filter.filters[key] when (result = filter value, boardID, post.isReply)
|
for filter in Filter.filters[key] when (result = filter value, post.boardID, post.isReply)
|
||||||
{hide, stub} = result
|
{hide, stub} = result
|
||||||
if hide
|
if hide
|
||||||
return {hide, stub} if hideable
|
return {hide, stub} if hideable
|
||||||
|
|||||||
@ -6,9 +6,11 @@ class Post
|
|||||||
@normalizedOriginal = Build.Test.normalize root
|
@normalizedOriginal = Build.Test.normalize root
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
@ID = +root.id[2..]
|
@ID = +root.id[2..]
|
||||||
@fullID = "#{@board}.#{@ID}"
|
@threadID = @thread.ID
|
||||||
@context = @
|
@boardID = @board.ID
|
||||||
|
@fullID = "#{@board}.#{@ID}"
|
||||||
|
@context = @
|
||||||
|
|
||||||
root.dataset.fullID = @fullID
|
root.dataset.fullID = @fullID
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user