Fix Tinyboard file parsing on Firefox.

This commit is contained in:
ccd0 2017-12-25 17:31:02 -08:00
parent 5dd5ea8030
commit a0b80f0134

View File

@ -104,7 +104,7 @@ SW.tinyboard =
parseFile: (post, file) ->
{text, link, thumb} = file
return false if $.x("ancestor::#{Site.xpath.postContainer}", text) isnt post.nodes.root # file belongs to a reply
return false if $.x("ancestor::#{Site.xpath.postContainer}[1]", text) isnt post.nodes.root # file belongs to a reply
return false if not (infoNode = link.nextElementSibling)
return false if not (info = infoNode.textContent.match /\((Spoiler Image, )?([\d.]+ [KMG]?B).*\)/)
nameNode = $ '.postfilename', text