Merge branch 'next'

This commit is contained in:
ccd0 2017-06-28 12:22:16 -07:00
commit 06f22f652b

View File

@ -113,19 +113,25 @@ Filter =
test: (post, hideable=true) -> test: (post, hideable=true) ->
return post.filterResults if post.filterResults return post.filterResults if post.filterResults
hl = undefined hide = false
top = false stub = true
hl = undefined
top = false
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, post.boardID, post.isReply) for filter in Filter.filters[key] when (result = filter value, post.boardID, post.isReply)
{hide, stub} = result if result.hide
if hide if hideable
return {hide, stub} if hideable hide = true
stub and= result.stub
else else
unless hl and result.class in hl unless hl and result.class in hl
(hl or= []).push result.class (hl or= []).push result.class
top or= result.top top or= result.top
{hl, top} if hide
{hide, stub}
else
{hl, top}
node: -> node: ->
return if @isClone return if @isClone