diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee
index fc6e302d3..122a7c8c4 100644
--- a/src/Filtering/PostHiding.coffee
+++ b/src/Filtering/PostHiding.coffee
@@ -111,10 +111,12 @@ PostHiding =
$.event 'CloseMenu'
makeButton: (post, type) ->
+ span = $.el 'span',
+ textContent: "[\u00A0#{if type is 'hide' then '-' else '+'}\u00A0]"
a = $.el 'a',
className: "#{type}-reply-button"
- innerHTML: "[ #{if type is 'hide' then '-' else '+'} ]"
href: 'javascript:;'
+ $.add a, span
$.on a, 'click', PostHiding.toggle
a
@@ -166,7 +168,7 @@ PostHiding =
className: 'stub'
$.add post.nodes.stub, a
if Conf['Menu']
- $.add post.nodes.stub, [$.tn(' '), Menu.makeButton()]
+ $.add post.nodes.stub, Menu.makeButton()
$.prepend post.nodes.root, post.nodes.stub
show: (post, showRecursively=Conf['Recursive Hiding']) ->
diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee
index a5ecb82de..bc0068067 100644
--- a/src/Filtering/ThreadHiding.coffee
+++ b/src/Filtering/ThreadHiding.coffee
@@ -124,7 +124,7 @@ ThreadHiding =
thread.stub = $.el 'div',
className: 'stub'
if Conf['Menu']
- $.add thread.stub, [a, $.tn(' '), Menu.makeButton()]
+ $.add thread.stub, [a, Menu.makeButton()]
else
$.add thread.stub, a
$.prepend root, thread.stub
diff --git a/src/General/Build.coffee b/src/General/Build.coffee
index 28074703d..6fa1278b8 100644
--- a/src/General/Build.coffee
+++ b/src/General/Build.coffee
@@ -1,4 +1,6 @@
Build =
+ staticPath: '//s.4cdn.org/image/'
+ gifIcon: if window.devicePixelRatio >= 2 then '@2x.gif' else '.gif'
spoilerRange: {}
shortFilename: (filename, isReply) ->
# FILENAME SHORTENING SCIENCE:
@@ -61,12 +63,12 @@ Build =
file
} = o
isOP = postID is threadID
+ {staticPath, gifIcon} = Build
- staticPath = '//s.4cdn.org/image/'
- gifIcon = if window.devicePixelRatio >= 2
- '@2x.gif'
+ tripcode = if tripcode
+ " #{tripcode}"
else
- '.gif'
+ ''
if email
emailStart = ''
@@ -75,41 +77,35 @@ Build =
emailStart = ''
emailEnd = ''
- subject = "#{subject or ''}"
-
- userID =
- if !capcode and uniqueID
- " (ID: " +
- "#{uniqueID}) "
- else
- ''
-
switch capcode
when 'admin', 'admin_highlight'
capcodeClass = " capcodeAdmin"
capcodeStart = " ## Admin"
- capcode = " "
when 'mod'
capcodeClass = " capcodeMod"
capcodeStart = " ## Mod"
- capcode = "
"
when 'developer'
capcodeClass = " capcodeDeveloper"
capcodeStart = " ## Developer"
- capcode = "
"
else
capcodeClass = ''
capcodeStart = ''
- capcode = ''
+ capcodeIcon = ''
+
+ userID = if uniqueID and !capcode
+ " (ID: " +
+ "#{uniqueID})"
+ else
+ ''
flag = unless flagCode
''
@@ -128,13 +124,7 @@ Build =
"
" +
""
else if file
- ext = file.name[-3..]
- if !file.twidth and !file.theight and ext is 'gif' # wtf ?
- file.twidth = file.width
- file.theight = file.height
-
- fileSize = $.bytesToString file.size
-
+ fileSize = $.bytesToString file.size
fileThumb = file.turl
if file.isSpoiler
fileSize = "Spoiler Image, #{fileSize}"
@@ -153,20 +143,17 @@ Build =
"
" +
""
- # Ha ha, filenames!
# html -> text, translate WebKit's %22s into "s
a = $.el 'a', innerHTML: file.name
filename = a.textContent.replace /%22/g, '"'
-
# shorten filename, get html
a.textContent = Build.shortFilename filename
shortFilename = a.innerHTML
-
# get html
a.textContent = filename
filename = a.innerHTML.replace /'/g, '''
- fileDims = if ext is 'pdf' then 'PDF' else "#{file.width}x#{file.height}"
+ fileDims = if file.name[-3..] is 'pdf' then 'PDF' else "#{file.width}x#{file.height}"
fileInfo = "