From ff7793bb96a7907c54d73af982561ec3c361445a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 22 Nov 2014 19:16:22 -0800 Subject: [PATCH] Make some of the gallery keybinds configurable. --- src/General/Config.coffee | 10 +++++++++- src/Images/Gallery.coffee | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index e115723b3..09a62ce18 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -658,7 +658,7 @@ vp-replace ] 'Close': [ 'Esc' - 'Close Settings, Notifications or QR.' + 'Close Settings/Notifications/QR/Gallery.' ] 'Spoiler tags': [ 'Ctrl+s' @@ -706,6 +706,14 @@ vp-replace 'g' 'Opens the gallery.' ] + 'Pause': [ + 'p' + 'Pause/play videos in the gallery.' + ] + 'Slideshow': [ + 's' + 'Toggle the gallery slideshow mode.' + ] 'fappeTyme': [ 'f' 'Toggle Fappe Tyme.' diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 23eace7f7..21bf07a28 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -201,7 +201,7 @@ Gallery = return unless key = Keybinds.keyCode e cb = switch key - when 'Esc', Conf['Open Gallery'] + when Conf['Close'], Conf['Open Gallery'] Gallery.cb.close when 'Right' Gallery.cb.next @@ -209,9 +209,9 @@ Gallery = Gallery.cb.enterKey when 'Left', '' Gallery.cb.prev - when 'p' + when Conf['Pause'] Gallery.cb.pause - when 's' + when Conf['Slideshow'] Gallery.cb.toggleSlideshow return unless cb