Simplify and remove a needless condition.
This commit is contained in:
parent
990bc968bb
commit
875f2c06a5
@ -113,10 +113,11 @@ Keybinds =
|
||||
# Images
|
||||
when Conf['Expand image']
|
||||
return unless ImageExpand.enabled and threadRoot
|
||||
Keybinds.img threadRoot
|
||||
post = Get.postFromNode Keybinds.post threadRoot
|
||||
ImageExpand.toggle post if post.file
|
||||
when Conf['Expand images']
|
||||
return unless ImageExpand.enabled and threadRoot
|
||||
Keybinds.img threadRoot, true
|
||||
return unless ImageExpand.enabled
|
||||
ImageExpand.cb.toggleAll()
|
||||
when Conf['Open Gallery']
|
||||
return unless Gallery.enabled
|
||||
Gallery.cb.toggle()
|
||||
@ -304,13 +305,6 @@ Keybinds =
|
||||
""
|
||||
else "sage"
|
||||
|
||||
img: (thread, all) ->
|
||||
if all
|
||||
ImageExpand.cb.toggleAll()
|
||||
else
|
||||
post = Get.postFromNode Keybinds.post thread
|
||||
ImageExpand.toggle post if post.file
|
||||
|
||||
open: (thread, tab) ->
|
||||
return if g.VIEW isnt 'index'
|
||||
url = "/#{thread.board}/thread/#{thread}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user