From 378d2be2da5f8f7b29f0c0ad04a40f11573633b3 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 25 Sep 2016 14:25:51 -0700 Subject: [PATCH] Simplify Build.thread arguments. --- src/General/Build.coffee | 8 ++++---- src/General/Index.coffee | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 1d22c6696..521a8bb42 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -162,22 +162,22 @@ Build = textContent: Build.summaryText '', posts, files href: "/#{boardID}/thread/#{threadID}" - thread: (board, data, OP) -> - if (root = OP.nodes.root.parentNode) + thread: (thread, data) -> + if (root = thread.OP.nodes.root.parentNode) $.rmAll root else root = $.el 'div', className: 'thread' id: "t#{data.no}" $.add root, Build.hat.cloneNode(false) if Build.hat - $.add root, OP.nodes.root + $.add root, thread.OP.nodes.root if data.omitted_posts or !Conf['Show Replies'] and data.replies [posts, files] = if Conf['Show Replies'] # XXX data.omitted_images is not accurate. [data.omitted_posts, data.images - data.last_replies.filter((data) -> !!data.ext).length] else [data.replies, data.images] - summary = Build.summary board.ID, data.no, posts, files + summary = Build.summary thread.board.ID, data.no, posts, files $.add root, summary root diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 5abf1ae4a..79632ee45 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -592,7 +592,7 @@ Index = posts.push OP thread.setPage i // Index.threadsNumPerPage + 1 - Index.nodes[thread.ID] = Build.thread g.BOARD, threadData, OP + Index.nodes[thread.ID] = Build.thread thread, threadData catch err # Skip posts that we failed to parse. errors = [] unless errors