From 174e540ee23a0e91c10b5a8ecd0dd4792ebed885 Mon Sep 17 00:00:00 2001 From: Hupotronic Date: Wed, 30 Apr 2014 15:38:07 +0300 Subject: [PATCH] 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. --- src/General/Post.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/General/Post.coffee b/src/General/Post.coffee index ae0faa502..15a4b71bd 100644 --- a/src/General/Post.coffee +++ b/src/General/Post.coffee @@ -148,7 +148,7 @@ class Post @file.isImage = /(jpg|png|gif)$/i.test @file.name @file.isVideo = /webm$/i.test @file.name 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) -> for node in $$ '.mobile', root