From 4b3b0b1ffdecacbb89d34475569af3bf337941c2 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 6 Sep 2014 20:04:15 -0700 Subject: [PATCH] don't need to save the old thumb anymore --- src/General/lib/clone.class | 6 ------ src/Images/ImageLoader.coffee | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/General/lib/clone.class b/src/General/lib/clone.class index 6f6f3c81e..476cfeb05 100755 --- a/src/General/lib/clone.class +++ b/src/General/lib/clone.class @@ -60,12 +60,6 @@ class Clone extends Post @file.fullImage = $ '.full-image', file @file.videoControls = $ '.video-controls', @file.text - # Restore old image thumbnail in quote preview for replaced WebMs - if !@file.thumb - @file.thumb = @file.oldThumb.cloneNode true - $.prepend $('.fileThumb', file), @file.thumb - delete @file.oldThumb - # Contract thumbnails in quote preview ImageExpand.contract @ if contractThumb diff --git a/src/Images/ImageLoader.coffee b/src/Images/ImageLoader.coffee index be52abb3b..78ddbcaf3 100755 --- a/src/Images/ImageLoader.coffee +++ b/src/Images/ImageLoader.coffee @@ -10,7 +10,7 @@ ImageLoader = if Conf['Replace WEBM'] and Conf['Autoplay'] $.on d, 'scroll visibilitychange', -> g.posts.forEach (post) -> - if post.file?.oldThumb + if post.file?.videoThumb {thumb} = post.file visible = !d.hidden and Header.isNodeVisible thumb if visible then thumb.play() else thumb.pause() @@ -30,7 +30,7 @@ ImageLoader = node: (force) -> return unless @file {isImage, isVideo, thumb, URL} = @file - if @isClone and @file.oldThumb + if @isClone and @file.videoThumb ImageLoader.play thumb return if @isClone or @isHidden or @thread.isHidden or !(isImage or isVideo) {style} = thumb @@ -69,7 +69,7 @@ ImageLoader = if isVideo $.on el, 'mouseover', ImageHover.mouseover if Conf['Image Hover'] $.replace thumb, el - file.oldThumb or= thumb + file.videoThumb = true file.thumb = el ImageLoader.play el unless post.isFetchedQuote else