don't need to save the old thumb anymore
This commit is contained in:
parent
d533f0ed95
commit
4b3b0b1ffd
@ -60,12 +60,6 @@ class Clone extends Post
|
|||||||
@file.fullImage = $ '.full-image', file
|
@file.fullImage = $ '.full-image', file
|
||||||
@file.videoControls = $ '.video-controls', @file.text
|
@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
|
# Contract thumbnails in quote preview
|
||||||
ImageExpand.contract @ if contractThumb
|
ImageExpand.contract @ if contractThumb
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ ImageLoader =
|
|||||||
if Conf['Replace WEBM'] and Conf['Autoplay']
|
if Conf['Replace WEBM'] and Conf['Autoplay']
|
||||||
$.on d, 'scroll visibilitychange', ->
|
$.on d, 'scroll visibilitychange', ->
|
||||||
g.posts.forEach (post) ->
|
g.posts.forEach (post) ->
|
||||||
if post.file?.oldThumb
|
if post.file?.videoThumb
|
||||||
{thumb} = post.file
|
{thumb} = post.file
|
||||||
visible = !d.hidden and Header.isNodeVisible thumb
|
visible = !d.hidden and Header.isNodeVisible thumb
|
||||||
if visible then thumb.play() else thumb.pause()
|
if visible then thumb.play() else thumb.pause()
|
||||||
@ -30,7 +30,7 @@ ImageLoader =
|
|||||||
node: (force) ->
|
node: (force) ->
|
||||||
return unless @file
|
return unless @file
|
||||||
{isImage, isVideo, thumb, URL} = @file
|
{isImage, isVideo, thumb, URL} = @file
|
||||||
if @isClone and @file.oldThumb
|
if @isClone and @file.videoThumb
|
||||||
ImageLoader.play thumb
|
ImageLoader.play thumb
|
||||||
return if @isClone or @isHidden or @thread.isHidden or !(isImage or isVideo)
|
return if @isClone or @isHidden or @thread.isHidden or !(isImage or isVideo)
|
||||||
{style} = thumb
|
{style} = thumb
|
||||||
@ -69,7 +69,7 @@ ImageLoader =
|
|||||||
if isVideo
|
if isVideo
|
||||||
$.on el, 'mouseover', ImageHover.mouseover if Conf['Image Hover']
|
$.on el, 'mouseover', ImageHover.mouseover if Conf['Image Hover']
|
||||||
$.replace thumb, el
|
$.replace thumb, el
|
||||||
file.oldThumb or= thumb
|
file.videoThumb = true
|
||||||
file.thumb = el
|
file.thumb = el
|
||||||
ImageLoader.play el unless post.isFetchedQuote
|
ImageLoader.play el unless post.isFetchedQuote
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user