From 480ffba15c582755bff51288f2efb9420198e680 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 7 Apr 2014 09:14:54 +0200 Subject: [PATCH] Keep playing .webms in clones. --- src/Images/ImageExpand.coffee | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index ccc23709a..3d5cb6522 100644 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -16,12 +16,16 @@ ImageExpand = return unless @file and (@file.isImage or @file.isVideo) {thumb} = @file $.on thumb.parentNode, 'click', ImageExpand.cb.toggle - if @isClone and $.hasClass thumb, 'expanding' - # If we clone a post where the image is still loading, - # make it loading in the clone too. - ImageExpand.contract @ - ImageExpand.expand @ - return + if @isClone + if @file.isImage and $.hasClass thumb, 'expanding' + # If we clone a post where the image is still loading, + # make it loading in the clone too. + ImageExpand.contract @ + ImageExpand.expand @ + return + if @file.isVideo and $.hasClass @nodes.root, 'expanded-image' + @file.fullImage.play() + return if ImageExpand.on and !@isHidden and (Conf['Expand spoilers'] or !@file.isSpoiler) ImageExpand.expand @ cb: