From 7228698012e44e390e106e2af71569f81b7fa487 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 24 Apr 2015 23:51:02 -0700 Subject: [PATCH] Move JSON parsing into separate function from post building. --- src/General/Build.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 45612d081..03b419703 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -32,7 +32,7 @@ Build = else "/#{boardID}/thread/#{threadID}#p#{postID}" - postFromObject: (data, boardID, suppressThumb) -> + parseJSON: (data, boardID) -> o = # id postID: data.no @@ -75,6 +75,10 @@ Build = isSpoiler: !!data.spoiler tag: data.tag o.file.dimensions = "#{o.file.width}x#{o.file.height}" unless /\.pdf$/.test o.file.url + o + + postFromObject: (data, boardID, suppressThumb) -> + o = Build.parseJSON data, boardID Build.post o, suppressThumb post: (o, suppressThumb) ->