From d44b206e441211cc356357f8befa2b917d286c12 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 16 May 2016 22:25:21 -0700 Subject: [PATCH] Fix download button not working in clones. #906 --- src/Miscellaneous/FileInfo.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 4bf85284f..374580b13 100644 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -7,7 +7,11 @@ FileInfo = cb: @node node: -> - return if !@file or @isClone + return unless @file + if @isClone + for a in $$ '.file-info .download-button', @file.text + $.on a, 'click', ImageCommon.download + return oldInfo = $.el 'span', {className: 'fileText-original'} $.prepend @file.link.parentNode, oldInfo