diff --git a/src/General/Build.coffee b/src/General/Build.coffee
index be2fa89ad..691668805 100644
--- a/src/General/Build.coffee
+++ b/src/General/Build.coffee
@@ -35,7 +35,10 @@ Build =
o.file =
name: data.filename + data.ext
timestamp: "#{data.tim}#{data.ext}"
- url: "//images.4chan.org/#{boardID}/src/#{data.tim}#{data.ext}"
+ url: if boardID is 'f'
+ "//images.4channel.org/#{boardID}/src/#{data.filename}#{data.ext}"
+ else
+ "//images.4chan.org/#{boardID}/src/#{data.tim}#{data.ext}"
height: data.h
width: data.w
MD5: data.md5
@@ -56,7 +59,7 @@ Build =
} = o
isOP = postID is threadID
- staticPath = '//static.4chan.org'
+ staticPath = '//static.4chan.org/image/'
if email
emailStart = ''
@@ -79,21 +82,21 @@ Build =
capcodeClass = " capcodeAdmin"
capcodeStart = " ## Admin"
- capcode = "
"
when 'mod'
capcodeClass = " capcodeMod"
capcodeStart = " ## Mod"
- capcode = "
"
when 'developer'
capcodeClass = " capcodeDeveloper"
capcodeStart = " ## Developer"
- capcode = "
"
else
@@ -103,21 +106,20 @@ Build =
flag =
if flagCode
- "
"
else
''
if file?.isDeleted
- fileHTML =
- if isOP
- "" +
- "
" +
- " "
- else
- "" +
- "
" +
- " "
+ fileHtml = if isOP
+ "" +
+ "
" +
+ " "
+ else
+ "" +
+ "
" +
+ " "
else if file
ext = file.name[-3..]
if !file.twidth and !file.theight and ext is 'gif' # wtf ?
@@ -130,16 +132,19 @@ Build =
if file.isSpoiler
fileSize = "Spoiler Image, #{fileSize}"
unless isArchived
- fileThumb = '//static.4chan.org/image/spoiler'
+ fileThumb = "#{staticPath}spoiler"
if spoilerRange = Build.spoilerRange[boardID]
# Randomize the spoiler image.
fileThumb += "-#{boardID}" + Math.floor 1 + spoilerRange * Math.random()
fileThumb += '.png'
file.twidth = file.theight = 100
- if boardID.ID isnt 'f'
- imgSrc = "" +
- "
"
+ imgSrc = if boardID is 'f'
+ ''
+ else
+ "" +
+ "
" +
+ ""
# Ha ha, filenames!
# html -> text, translate WebKit's %22s into "s
@@ -175,12 +180,12 @@ Build =
sticky =
if isSticky
- '
'
+ "
"
else
''
closed =
if isClosed
- '
'
+ "
"
else
''