diff --git a/src/General/Settings/Advanced.html b/src/General/Settings/Advanced.html index 420a1a711..70d611b1d 100644 --- a/src/General/Settings/Advanced.html +++ b/src/General/Settings/Advanced.html @@ -69,6 +69,7 @@
:
Link: %l (truncated), %L (untruncated), %T (4chan filename)
Filename: %n (truncated), %N (untruncated), %t (4chan filename)
+
Download button: %d
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 8b98dadb4..4bf85284f 100644 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -26,6 +26,9 @@ FileInfo = <%= html('${s}') %> '' $.extend outputNode, <%= html('@{output}') %> + for a in $$ '.download-button', outputNode + $.on a, 'click', ImageCommon.download + return formatters: t: -> <%= html('${this.file.url.match(/[^\/]*$/)[0]}') %> @@ -40,6 +43,7 @@ FileInfo = else <%= html('${shortname}${fullname}') %> N: -> <%= html('${this.file.name}') %> + d: -> <%= html('') %> p: -> <%= html('?{this.file.isSpoiler}{Spoiler, }') %> s: -> <%= html('${this.file.size}') %> B: -> <%= html('${Math.round(this.file.sizeInBytes)} Bytes') %>