Use childNodes[2] for finding file resolution
ExLinks support vanilla 4chan and can add in its reverse image search link to the .fileText before 4chan X manages to parse it. As a result, 4chan X ends up looking at the reverse image search link for dimensions instead of the correct text element. Using childNodes[2] instead of lastChild fixes this.
This commit is contained in:
parent
2de487906c
commit
174e540ee2
@ -148,7 +148,7 @@ class Post
|
|||||||
@file.isImage = /(jpg|png|gif)$/i.test @file.name
|
@file.isImage = /(jpg|png|gif)$/i.test @file.name
|
||||||
@file.isVideo = /webm$/i.test @file.name
|
@file.isVideo = /webm$/i.test @file.name
|
||||||
if @file.isImage or @file.isVideo
|
if @file.isImage or @file.isVideo
|
||||||
@file.dimensions = fileText.lastChild.data.match(/\d+x\d+/)[0]
|
@file.dimensions = fileText.childNodes[2].data.match(/\d+x\d+/)[0]
|
||||||
|
|
||||||
cleanup: (root, post) ->
|
cleanup: (root, post) ->
|
||||||
for node in $$ '.mobile', root
|
for node in $$ '.mobile', root
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user