From 815f58be8b81ca356a49fcc68d74d71f11d7784f Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 5 Jul 2014 12:56:58 -0700 Subject: [PATCH] add keybinds for toggling slideshow and video pausing --- src/General/html/Features/Gallery.html | 4 ++-- src/Images/Gallery.coffee | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/General/html/Features/Gallery.html b/src/General/html/Features/Gallery.html index 4ae6f4e80..8e1a265dc 100644 --- a/src/General/html/Features/Gallery.html +++ b/src/General/html/Features/Gallery.html @@ -1,7 +1,7 @@
- - + + × diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index c692f9733..10909fc6a 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -125,6 +125,10 @@ Gallery = Gallery.cb.advanceKey when 'Left', '' Gallery.cb.prev + when 'p' + Gallery.cb.pause + when 's' + Gallery.cb.toggleSlideshow return unless cb e.stopPropagation() @@ -203,6 +207,7 @@ Gallery = toggle: -> (if Gallery.nodes then Gallery.cb.close else Gallery.build)() blank: (e) -> Gallery.cb.close() if e.target is @ advance: -> Gallery.cb.advanceKey() unless Gallery.nodes.current.controls + toggleSlideshow: -> Gallery.cb[if Gallery.slideshow then 'stop' else 'start']() advanceKey: -> if Gallery.nodes.current.paused then return Gallery.nodes.current.play()