diff --git a/src/General/Build.coffee b/src/General/Build.coffee
index 398492bcb..a0ce81f8d 100644
--- a/src/General/Build.coffee
+++ b/src/General/Build.coffee
@@ -224,3 +224,18 @@ Build =
$.addClass root, 'noFile' unless thread.OP.file
root
+
+ catalogReply: (thread, data) ->
+ excerpt = ''
+ if data.com
+ excerpt = Build.parseCommentDisplay(data.com).replace(/>>\d+/g, '').trim().replace(/\n+/g, ' // ')
+ if data.ext
+ excerpt or= "#{data.filename}#{data.ext}"
+ if data.com
+ excerpt or= Build.unescape data.com.replace(/
/gi, ' // ')
+ excerpt or= '\xA0'
+ excerpt = "#{excerpt[...70]}..." if excerpt.length > 73
+
+ link = Build.postURL thread.board.ID, thread.ID, data.no
+ $.el 'div', {className: 'catalog-reply'},
+ <%= readHTML('CatalogReply.html') %>
diff --git a/src/General/Index/CatalogReply.html b/src/General/Build/CatalogReply.html
similarity index 100%
rename from src/General/Index/CatalogReply.html
rename to src/General/Build/CatalogReply.html
diff --git a/src/General/Index.coffee b/src/General/Index.coffee
index 3d4678b9d..c6ad91458 100644
--- a/src/General/Index.coffee
+++ b/src/General/Index.coffee
@@ -690,19 +690,7 @@ Index =
replies = []
for data in lastReplies
- excerpt = ''
- if data.com
- excerpt = Build.parseCommentDisplay(data.com).replace(/>>\d+/g, '').trim().replace(/\n+/g, ' // ')
- if data.ext
- excerpt or= "#{data.filename}#{data.ext}"
- if data.com
- excerpt or= Build.unescape data.com.replace(/
/gi, ' // ')
- excerpt or= '\xA0'
- excerpt = "#{excerpt[...70]}..." if excerpt.length > 73
-
- link = Build.postURL thread.board.ID, thread.ID, data.no
- reply = $.el 'div', {className: 'catalog-reply'},
- <%= readHTML('CatalogReply.html') %>
+ reply = Build.catalogReply thread, data
RelativeDates.update $('time', reply)
$.on $('.catalog-reply-preview', reply), 'mouseover', QuotePreview.mouseover
replies.push reply