Speed this up when prefetching is off.
This commit is contained in:
parent
88dcd18204
commit
25e88edd1c
@ -2,14 +2,15 @@ ImageLoader =
|
|||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW in ['index', 'thread', 'archive']
|
return unless g.VIEW in ['index', 'thread', 'archive']
|
||||||
return unless Conf['Image Prefetching'] or
|
return unless Conf['Image Prefetching'] or
|
||||||
Conf['Replace JPG'] or Conf['Replace PNG'] or Conf['Replace GIF'] or Conf['Replace WEBM']
|
(replace = Conf['Replace JPG'] or Conf['Replace PNG'] or Conf['Replace GIF'] or Conf['Replace WEBM'])
|
||||||
|
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Image Replace'
|
name: 'Image Replace'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|
||||||
$.on d, 'PostsInserted', ->
|
$.on d, 'PostsInserted', ->
|
||||||
g.posts.forEach ImageLoader.prefetchAll
|
if Conf['prefetch'] or replace
|
||||||
|
g.posts.forEach ImageLoader.prefetchAll
|
||||||
|
|
||||||
if Conf['Replace WEBM']
|
if Conf['Replace WEBM']
|
||||||
$.on d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', @playVideos
|
$.on d, 'scroll visibilitychange 4chanXInitFinished PostsInserted', @playVideos
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user