From 34888c1dcb0950e334b8b3ef733990877f60b5e5 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 23 Jan 2015 23:48:59 -0800 Subject: [PATCH] Fix missing Gallery.cb.toggleSlideshow. --- builds/appchan-x.user.js | 3 +++ builds/crx/script.js | 3 +++ src/Images/Gallery.coffee | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 143080e15..3fa553715 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -11372,6 +11372,9 @@ return Gallery.cb.close(); } }, + toggleSlideshow: function() { + return Gallery.cb[Gallery.slideshow ? 'stop' : 'start'](); + }, pause: function() { var current; Gallery.cb.stop(); diff --git a/builds/crx/script.js b/builds/crx/script.js index 45e7bbe8c..555c6e55f 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -11408,6 +11408,9 @@ return Gallery.cb.close(); } }, + toggleSlideshow: function() { + return Gallery.cb[Gallery.slideshow ? 'stop' : 'start'](); + }, pause: function() { var current; Gallery.cb.stop(); diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index c6605eb92..058568dc5 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -254,7 +254,8 @@ Gallery = click: -> Gallery.cb[if Gallery.nodes.current.controls then 'stop' else 'enterKey']() toggle: -> (if Gallery.nodes then Gallery.cb.close else Gallery.build)() blank: (e) -> Gallery.cb.close() if e.target is @ - + toggleSlideshow: -> Gallery.cb[if Gallery.slideshow then 'stop' else 'start']() + pause: -> Gallery.cb.stop() {current} = Gallery.nodes