Fix errors due to <font> tag in file info on /s4s/
This commit is contained in:
parent
04a0b95922
commit
79e9d06047
@ -1,3 +1,6 @@
|
||||
**ccd0**
|
||||
- Fix errors due to <font> tag in file info on /s4s/.
|
||||
|
||||
### v1.7.61
|
||||
*2014-06-15*
|
||||
|
||||
|
||||
@ -132,11 +132,10 @@ class Post
|
||||
"#{location.protocol}//t.4cdn.org/#{@board}/#{@file.URL.match(/(\d+)\./)[1]}s.jpg"
|
||||
@file.isImage = /(jpg|png|gif)$/i.test @file.URL
|
||||
@file.isVideo = /webm$/i.test @file.URL
|
||||
nameNode = $ 'a', fileText
|
||||
if @file.isImage or @file.isVideo
|
||||
@file.dimensions = fileText.childNodes[2].textContent.match(/\d+x\d+/)?[0]
|
||||
@file.name = fileText.title or do ->
|
||||
nameNode = $('span', fileText) or $('a', fileText)
|
||||
nameNode?.title or nameNode?.textContent
|
||||
@file.dimensions = nameNode.nextSibling.textContent.match(/\d+x\d+/)[0]
|
||||
@file.name = fileText.title or nameNode.title or nameNode.textContent
|
||||
|
||||
cleanup: (root) ->
|
||||
for node in $$ '.mobile', root
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user