From e80fc5a7627f82c9752580e77df1c9c1ef4c52c0 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 28 May 2012 14:17:02 +0200 Subject: [PATCH] Can't parseFloat a spoilered image. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 13162eaae..ff6c1308f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2878,7 +2878,7 @@ FileInfo.data = { link: post.img.parentNode.href, spoiler: /^Spoiler/.test(alt), - size: parseFloat(alt), + size: alt.match(/\d+\.?\d*/)[0], unit: alt.match(/\w+$/)[0], resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0], fullname: span.title, diff --git a/script.coffee b/script.coffee index 12df514b8..895d2d898 100644 --- a/script.coffee +++ b/script.coffee @@ -2226,7 +2226,7 @@ FileInfo = FileInfo.data = link: post.img.parentNode.href spoiler: /^Spoiler/.test alt - size: parseFloat alt + size: alt.match(/\d+\.?\d*/)[0] unit: alt.match(/\w+$/)[0] resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0] fullname: span.title