From 27e8c59297d9f7cd733830e27dd214f41976750d Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 13 Apr 2015 01:44:27 -0700 Subject: [PATCH] Add file.dimensions to Build.coffee object. --- src/General/Build.coffee | 2 +- src/General/html/Build/File.html | 4 ++-- src/General/lib/fetcher.class | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 1682ec05c..b1e0b6995 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -69,6 +69,7 @@ Build = twidth: data.tn_w isSpoiler: !!data.spoiler tag: data.tag + o.file.dimensions = "#{o.file.width}x#{o.file.height}" unless /\.pdf$/.test o.file.url Build.post o, suppressThumb post: (o, suppressThumb) -> ### @@ -111,7 +112,6 @@ Build = protocol = /^https?:(?=\/\/i\.4cdn\.org\/)/ fileURL = file.url.replace protocol, '' shortFilename = Build.shortFilename file.name - fileDims = if file.url[-4..] is '.pdf' then 'PDF' else "#{file.width}x#{file.height}" fileThumb = if file.isSpoiler then Build.spoilerThumb(boardID) else file.thumbURL.replace(protocol, '') fileBlock = <%= importHTML('Build/File') %> diff --git a/src/General/html/Build/File.html b/src/General/html/Build/File.html index dc538b065..e43c0e78b 100644 --- a/src/General/html/Build/File.html +++ b/src/General/html/Build/File.html @@ -4,7 +4,7 @@
File: ${file.name} - -(${file.size}, ${fileDims}, ${file.tag}) + -(${file.size}, ${file.dimensions}, ${file.tag})
}{
@@ -12,7 +12,7 @@ ?{file.isSpoiler}{Spoiler Image}{${shortFilename}} - (${file.size}, ${fileDims}) + (${file.size}, ${file.dimensions || "PDF"})