Fix file size formatting using integers, not floats.

This commit is contained in:
Nicolas Stepien 2012-05-27 21:16:53 +02:00
parent 4e6ab4332b
commit b4ed4bf221
3 changed files with 4 additions and 2 deletions

View File

@ -2878,7 +2878,7 @@
FileInfo.data = { FileInfo.data = {
link: post.img.parentNode.href, link: post.img.parentNode.href,
spoiler: /^Spoiler/.test(alt), spoiler: /^Spoiler/.test(alt),
size: alt.match(/\d+/)[0], size: parseFloat(alt),
unit: alt.match(/\w+$/)[0], unit: alt.match(/\w+$/)[0],
resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0], resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0],
fullname: span.title, fullname: span.title,

View File

@ -1,4 +1,6 @@
master master
- Mayhem
Fix file size formatting always using integers.
2.30.5 2.30.5
- Mayhem - Mayhem

View File

@ -2226,7 +2226,7 @@ FileInfo =
FileInfo.data = FileInfo.data =
link: post.img.parentNode.href link: post.img.parentNode.href
spoiler: /^Spoiler/.test alt spoiler: /^Spoiler/.test alt
size: alt.match(/\d+/)[0] size: parseFloat alt
unit: alt.match(/\w+$/)[0] unit: alt.match(/\w+$/)[0]
resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0] resolution: span.previousSibling.textContent.match(/\d+x\d+|PDF/)[0]
fullname: span.title fullname: span.title