Fix EAI loading files in hidden posts. Fix #1542
This commit is contained in:
parent
78c86945f9
commit
de112fcfa9
@ -43,13 +43,13 @@ ImageExpand =
|
|||||||
ImageExpand.EAI.className = 'expand-all-shortcut fa fa-expand'
|
ImageExpand.EAI.className = 'expand-all-shortcut fa fa-expand'
|
||||||
ImageExpand.EAI.title = 'Expand All Images'
|
ImageExpand.EAI.title = 'Expand All Images'
|
||||||
func = ImageExpand.contract
|
func = ImageExpand.contract
|
||||||
for ID, post of g.posts
|
for ID, post of g.posts when post.file and (post.file.isImage or post.file.isVideo)
|
||||||
for post in [post].concat post.clones
|
for post in [post].concat post.clones
|
||||||
{file} = post
|
if ImageExpand.on and (
|
||||||
continue unless file and (file.isImage or file.isVideo) and doc.contains post.nodes.root
|
post.isHidden or
|
||||||
if ImageExpand.on and !post.isHidden and
|
!Conf['Expand spoilers'] and post.file.isSpoiler or
|
||||||
(!Conf['Expand spoilers'] and file.isSpoiler or
|
!doc.contains(post.nodes.root) or
|
||||||
Conf['Expand from here'] and Header.getTopOf(file.thumb) < 0)
|
Conf['Expand from here'] and Header.getTopOf(post.file.thumb) < 0)
|
||||||
continue
|
continue
|
||||||
$.queueTask func, post
|
$.queueTask func, post
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user