Unbreak a bunch of replace webm thumbnail features.

This commit is contained in:
Zixaphir 2014-07-17 13:36:54 -07:00
parent 1d6853b478
commit a0223a8db2
5 changed files with 13 additions and 57 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1193,6 +1193,7 @@ nav a,
opacity: .5;
}
.expanded-image > .post > .file > .fileThumb > img[data-md5],
.expanded-image > .post > .file > .fileThumb > video[data-md5],
.post > .file > .fileThumb > .full-image,
.post > .file > .full-image {
display: none;

View File

@ -5,10 +5,7 @@ class Clone extends Post
@[key] = origin[key]
{nodes} = origin
root = if contractThumb
@cloneWithoutVideo nodes.root
else
nodes.root.cloneNode true
root = nodes.root.cloneNode true
post = $ '.post', root
info = $ '.postInfo', post
@nodes =
@ -56,7 +53,7 @@ class Clone extends Post
@file[key] = val
file = $ '.file', post
@file.text = file.firstElementChild
@file.thumb = $ 'img[data-md5]', file
@file.thumb = $ 'img[data-md5], video[data-md5]', file
@file.fullImage = $ '.full-image', file
# Contract thumbnails in quote preview
@ -73,15 +70,4 @@ class Clone extends Post
@isDead = true if origin.isDead
@isClone = true
root.dataset.clone = origin.clones.push(@) - 1
cloneWithoutVideo: (node) ->
if node.tagName is 'VIDEO'
[]
else if node.nodeType is Node.ELEMENT_NODE and $ 'video', node
clone = node.cloneNode false
$.add clone, @cloneWithoutVideo child for child in node.childNodes
clone
else
node.cloneNode true
root.dataset.clone = origin.clones.push(@) - 1

View File

@ -46,6 +46,7 @@ ImageLoader =
file.style.maxWidth = style.maxWidth
file.loop = true
file.autoplay = Conf['Autoplay']
@file.thumb = file
$.on file, 'mouseover', ImageHover.mouseover if Conf['Image Hover']