Add option Expand thread only in Image Expansion menu; makes expanding all images when in index only operate within current thread.
This commit is contained in:
parent
c66529d4c5
commit
83b52f1bb5
@ -53,13 +53,15 @@ ImageExpand =
|
|||||||
|
|
||||||
toggleAll: ->
|
toggleAll: ->
|
||||||
$.event 'CloseMenu'
|
$.event 'CloseMenu'
|
||||||
|
threadRoot = Nav.getThread()
|
||||||
toggle = (post) ->
|
toggle = (post) ->
|
||||||
{file} = post
|
{file} = post
|
||||||
return unless file and (file.isImage or file.isVideo) and doc.contains post.nodes.root
|
return unless file and (file.isImage or file.isVideo) and doc.contains post.nodes.root
|
||||||
if ImageExpand.on and
|
if ImageExpand.on and
|
||||||
(!Conf['Expand spoilers'] and file.isSpoiler or
|
(!Conf['Expand spoilers'] and file.isSpoiler or
|
||||||
!Conf['Expand videos'] and file.isVideo or
|
!Conf['Expand videos'] and file.isVideo or
|
||||||
Conf['Expand from here'] and Header.getTopOf(file.thumb) < 0)
|
Conf['Expand from here'] and Header.getTopOf(file.thumb) < 0 or
|
||||||
|
Conf['Expand thread only'] and g.VIEW is 'index' and !threadRoot?.contains(file.thumb))
|
||||||
return
|
return
|
||||||
$.queueTask func, post
|
$.queueTask func, post
|
||||||
|
|
||||||
|
|||||||
@ -620,6 +620,10 @@ Config =
|
|||||||
false
|
false
|
||||||
'Expand all images only from current position to thread end.'
|
'Expand all images only from current position to thread end.'
|
||||||
]
|
]
|
||||||
|
'Expand thread only': [
|
||||||
|
false
|
||||||
|
'In index, expand all images only within the current thread.'
|
||||||
|
]
|
||||||
'Advance on contract': [
|
'Advance on contract': [
|
||||||
false
|
false
|
||||||
'Advance to next post when contracting an expanded image.'
|
'Advance to next post when contracting an expanded image.'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user