From 875f2c06a52832895d90b478226527f1b4f44e71 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 22 Jul 2019 17:13:30 -0700 Subject: [PATCH] Simplify and remove a needless condition. --- src/Miscellaneous/Keybinds.coffee | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 277fe2c04..45a0ca636 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -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}"