From 7c45f642f510940b55698f6461b7da811bc4e5e5 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 27 Sep 2014 17:54:43 -0700 Subject: [PATCH] allow quotelinks, dice rolls, fortunes in catalog --- src/General/Build.coffee | 13 +++++++++---- src/General/lib/post.class | 3 --- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 3f56a1eb3..dace186bb 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -337,6 +337,8 @@ Build = else <%= html('') %> + comment = innerHTML: data.com or '' + root = $.el 'div', className: 'catalog-thread' $.extend root, <%= html( @@ -348,17 +350,20 @@ Build = '' + '' + '&{subject}' + - '
&{thread.OP.info.commentHTML}
' + '
&{comment}
' ) %> root.dataset.fullID = thread.fullID $.addClass root, thread.OP.highlights... if thread.OP.highlights - for quotelink in $$ '.quotelink, .deadlink', root.lastElementChild - $.replace quotelink, [quotelink.childNodes...] + for quote in $$ '.quotelink', root.lastElementChild + href = quote.getAttribute 'href' + quote.href = "/#{thread.board}/thread/#{thread.ID}" + href if href[0] is '#' + for exif in $$ '.abbr, .exif', root.lastElementChild + $.rm exif for pp in $$ '.prettyprint', root.lastElementChild $.replace pp, $.tn pp.textContent - for br in $$ 'br', root.lastElementChild when !br.previousSibling or br.previousSibling.nodeName is 'BR' + for br in $$ 'br', root.lastElementChild when br.previousSibling?.nodeName is 'BR' $.rm br if thread.isSticky diff --git a/src/General/lib/post.class b/src/General/lib/post.class index fcc16f490..1b04d02ed 100755 --- a/src/General/lib/post.class +++ b/src/General/lib/post.class @@ -102,9 +102,6 @@ class Post $.rm node @info.comment = @nodesToText bq - # Save cleaned comment HTML. - @info.commentHTML = <%= html('&{bq}') %> - # Get the comment's text with spoilers hidden. spoilers = $$ 's', bq @info.commentSpoilered = if spoilers.length