Parse file when descendant of div.files > div.file

This commit is contained in:
name 2017-12-11 18:15:25 -08:00
parent 5a177796a8
commit cffa4df712

View File

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