From 9e4d2b6f019edda44261d98f8ea6b3a284c94c74 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 30 Sep 2014 22:37:43 -0700 Subject: [PATCH] Support party hats. --- src/General/Index.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 5d0877815..e5dfd0158 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -94,7 +94,12 @@ Index = $.on @selectSort, 'change', @cb.sort @update() - $.asap (-> $('.board', doc) or d.readyState isnt 'loading'), -> + $.asap (-> $('.board > .thread > .postContainer', doc) or d.readyState isnt 'loading'), -> + Index.hat = $ '.board > .thread > img:first-child' + if Index.hat and Index.nodes + for threadRoot in Index.nodes + $.prepend threadRoot, Index.hat.cloneNode false + board = $ '.board' $.replace board, Index.root $.event 'PostsInserted' @@ -443,6 +448,7 @@ Index = for threadData, i in Index.liveThreadData try threadRoot = Build.thread g.BOARD, threadData + $.prepend threadRoot, Index.hat.cloneNode false if Index.hat if thread = g.BOARD.threads[threadData.no] thread.setCount 'post', threadData.replies + 1, threadData.bumplimit thread.setCount 'file', threadData.images + !!threadData.ext, threadData.imagelimit