And a few more conditionals.

This commit is contained in:
ccd0 2015-03-28 16:24:27 -07:00
parent 9836d5ad07
commit dded914e41
2 changed files with 3 additions and 7 deletions

View File

@ -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('<span class="deadlink">${text2}</span>') %>
else
<%= html('${text2}') %>
text = <%= html('@{text}') %>
text = <%= html('<span class="quote">&{text}</span>') %> if greentext
<%= html('?{j % 2}{<span class="deadlink">${text2}</span>}{${text2}}') %>
text = <%= html('?{greentext}{<span class="quote">@{text}</span>}{@{text}}') %>
text
comment = <%= html('@{comment}') %>

View File

@ -40,7 +40,7 @@ FileInfo =
else
<%= html('<span class="fnswitch"><span class="fntrunc">${shortname}</span><span class="fnfull">${fullname}</span></span>') %>
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') %>