diff --git a/4chan_x.user.js b/4chan_x.user.js index 6c0b19f56..ef626da98 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: alt.match(/\d+/)[0], + size: parseFloat(alt), unit: alt.match(/\w+$/)[0], resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0], fullname: span.title, diff --git a/changelog b/changelog index ccfb83994..eefef1cc8 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Fix file size formatting always using integers. 2.30.5 - Mayhem diff --git a/script.coffee b/script.coffee index 9efc57aed..433a3101e 100644 --- a/script.coffee +++ b/script.coffee @@ -2226,7 +2226,7 @@ FileInfo = FileInfo.data = link: post.img.parentNode.href spoiler: /^Spoiler/.test alt - size: alt.match(/\d+/)[0] + size: parseFloat alt unit: alt.match(/\w+$/)[0] resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0] fullname: span.title