ImageLoader.quotePreviews -> playVideos

This commit is contained in:
ccd0 2015-01-24 10:32:06 -08:00
parent 95bd98d5c9
commit 6d2a3dfefb
3 changed files with 7 additions and 7 deletions

View File

@ -12162,7 +12162,7 @@
return g.posts.forEach(ImageLoader.prefetch);
});
if (Conf['Replace WEBM']) {
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', this.quotePreviews);
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', this.playVideos);
}
if (!Conf['Image Prefetching']) {
return;
@ -12269,7 +12269,7 @@
g.BOARD.posts.forEach(ImageLoader.prefetch);
}
},
quotePreviews: function() {
playVideos: function() {
var qpClone, _ref;
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0;
return g.posts.forEach(function(post) {

View File

@ -12185,7 +12185,7 @@
return g.posts.forEach(ImageLoader.prefetch);
});
if (Conf['Replace WEBM']) {
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', this.quotePreviews);
$.on(d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', this.playVideos);
}
if (!Conf['Image Prefetching']) {
return;
@ -12292,7 +12292,7 @@
g.BOARD.posts.forEach(ImageLoader.prefetch);
}
},
quotePreviews: function() {
playVideos: function() {
var qpClone, _ref;
qpClone = (_ref = $.id('qp')) != null ? _ref.firstElementChild : void 0;
return g.posts.forEach(function(post) {

View File

@ -12,7 +12,7 @@ ImageLoader =
g.posts.forEach ImageLoader.prefetch
if Conf['Replace WEBM']
$.on d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', @quotePreviews
$.on d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', @playVideos
return unless Conf['Image Prefetching']
@ -85,11 +85,11 @@ ImageLoader =
g.BOARD.posts.forEach ImageLoader.prefetch
return
quotePreviews: ->
playVideos: ->
# 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
return