This commit is contained in:
Zixaphir 2015-01-15 08:57:33 -07:00
parent f19c950efc
commit 3f56c11db0
6 changed files with 62 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.10.2 - 2015-01-14
* appchan x - Version 2.10.2 - 2015-01-15
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -715,7 +715,7 @@ Index =
return nodes
sizeSingleCatalogNode: (node, size) ->
thumb = node.firstElementChild
thumb = node.firstElementChild.firstElementChild
{width, height} = thumb.dataset
return unless width
ratio = size / Math.max width, height

View File

@ -142,11 +142,6 @@ body > hr {
-webkit-flex-shrink: 0;
position: relative;
}
.catalog-thumb,
.catalog-thread .thumb {
max-width: 100%;
max-height: 100%;
}
.catalog-thumb {
border-radius: 2px;
box-shadow: 0 0 5px rgba(0, 0, 0, .25);

View File

@ -11,7 +11,8 @@ ImageLoader =
$.on d, 'PostsInserted', ->
g.posts.forEach ImageLoader.prefetch
@processVideo() if Conf['Replace WEBM']
if Conf['Replace WEBM']
$.on d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', @quotePreviews
return unless Conf['Image Prefetching']
@ -82,4 +83,13 @@ ImageLoader =
toggle: ->
if Conf['prefetch'] = @checked
g.BOARD.posts.forEach ImageLoader.prefetch
return
return
quotePreviews: ->
# Special case: Quote previews are off screen when inserted into document, but quickly moved on screen.
qpClone = $.id('qp')?.firstElementChild
g.posts.forEach (post) ->
for post in [post, post.clones...] when post.file?.videoThumb
{thumb} = post.file
if Header.isNodeVisible(thumb) or post.nodes.root is qpClone then thumb.play() else thumb.pause()
return