From dded914e417e0e4738bd009ebe51104848c0abcc Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 28 Mar 2015 16:24:27 -0700 Subject: [PATCH] And a few more conditionals. --- src/General/lib/fetcher.class | 8 ++------ src/Miscellaneous/FileInfo.coffee | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/General/lib/fetcher.class b/src/General/lib/fetcher.class index 891ae1959..49baf9257 100644 --- a/src/General/lib/fetcher.class +++ b/src/General/lib/fetcher.class @@ -119,12 +119,8 @@ class Fetcher greentext = text[0] is '>' text = text.replace /(\[\/?[a-z]+):lit(\])/, '$1$2' text = for text2, j in text.split /(>>(?:>\/[a-z\d]+\/)?\d+)/g - if j % 2 is 1 - <%= html('${text2}') %> - else - <%= html('${text2}') %> - text = <%= html('@{text}') %> - text = <%= html('&{text}') %> if greentext + <%= html('?{j % 2}{${text2}}{${text2}}') %> + text = <%= html('?{greentext}{@{text}}{@{text}}') %> text comment = <%= html('@{comment}') %> diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 3b077f001..74ea41f97 100755 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -40,7 +40,7 @@ FileInfo = else <%= html('${shortname}${fullname}') %> N: -> <%= html('${this.file.name}') %> - p: -> if @file.isSpoiler then <%= html('Spoiler, ') %> else <%= html('') %> + p: -> <%= html('?{this.file.isSpoiler}{Spoiler, }') %> s: -> <%= html('${this.file.size}') %> B: -> <%= html('${Math.round(this.file.sizeInBytes)} Bytes') %> K: -> <%= html('${Math.round(this.file.sizeInBytes/1024)} KB') %>