diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 4bbc4c9d3..9d20c0163 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -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) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 4fa438f67..c87581b20 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -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) { diff --git a/src/Images/ImageLoader.coffee b/src/Images/ImageLoader.coffee index 2d3701741..9e6b0fdc7 100755 --- a/src/Images/ImageLoader.coffee +++ b/src/Images/ImageLoader.coffee @@ -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 \ No newline at end of file + return