Fix file text building, and spoiler filename parsing.
This commit is contained in:
parent
111fd03dda
commit
0280214f43
@ -1,3 +1,5 @@
|
|||||||
|
- Even more bug fixes.
|
||||||
|
|
||||||
### 3.20.7 - *2014-04-20*
|
### 3.20.7 - *2014-04-20*
|
||||||
|
|
||||||
- More bug fixes.
|
- More bug fixes.
|
||||||
|
|||||||
@ -155,13 +155,9 @@ Build =
|
|||||||
filename = a.innerHTML.replace /'/g, '''
|
filename = a.innerHTML.replace /'/g, '''
|
||||||
|
|
||||||
fileDims = if file.name[-3..] 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 = "<div class=fileText#{if file.isSpoiler then " title='#{filename}'" else ''}>File: <a href='#{file.url}' target=_blank>#{file.timestamp}</a>" +
|
fileInfo = "<div class=fileText #{if file.isSpoiler then "title='#{filename}'" else ''}>File: " +
|
||||||
"-(#{fileSize}, #{fileDims}#{
|
"<a href='#{file.url}' #{if filename isnt shortFilename and !file.isSpoiler then " title='#{filename}'" else ''} target=_blank>#{if file.isSpoiler then 'Spoiler Image' else shortFilename}</a>" +
|
||||||
if file.isSpoiler
|
" (#{fileSize}, #{fileDims})</div>"
|
||||||
''
|
|
||||||
else
|
|
||||||
", <span#{if filename isnt shortFilename then " title='#{filename}'" else ''}>#{shortFilename}</span>"
|
|
||||||
}" + ")</div>"
|
|
||||||
|
|
||||||
fileHTML = "<div class=file>#{fileInfo}#{imgSrc}</div>"
|
fileHTML = "<div class=file>#{fileInfo}#{imgSrc}</div>"
|
||||||
else
|
else
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class Post
|
|||||||
thumb.src
|
thumb.src
|
||||||
else
|
else
|
||||||
"#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg"
|
"#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg"
|
||||||
@file.name = if nameNode = $ 'a', fileText
|
@file.name = if !@file.isSpoiler and nameNode = $ 'a', fileText
|
||||||
nameNode.title or nameNode.textContent
|
nameNode.title or nameNode.textContent
|
||||||
else
|
else
|
||||||
fileText.title
|
fileText.title
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user