aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-08-12 16:01:27 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-08-12 16:01:27 +0200
commit80c375fae85d5b1edc2656641e03942739daa28b (patch)
tree05a3a63bfcad4e9cbb4005a93013dae658937f8f /js
parent841f9d0f9bb766b8dc67c7f2fa3c25a2555a8f19 (diff)
downloadfreenode-live-2017-presentation-80c375fae85d5b1edc2656641e03942739daa28b.tar
freenode-live-2017-presentation-80c375fae85d5b1edc2656641e03942739daa28b.tar.gz
the paused mode can now be disabled via the 'pause' config option
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/js/reveal.js b/js/reveal.js
index b4065d6..8110afc 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -89,6 +89,9 @@
// key is pressed
help: true,
+ // Flags if it should be possible to pause the presentation (blackout)
+ pause: true,
+
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
@@ -786,6 +789,11 @@
dom.wrapper.classList.remove( 'center' );
}
+ // Exit the paused mode if it was configured off
+ if( config.pause === false ) {
+ resume();
+ }
+
if( config.mouseWheel ) {
document.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF
document.addEventListener( 'mousewheel', onDocumentMouseScroll, false );
@@ -1717,13 +1725,15 @@
*/
function pause() {
- var wasPaused = dom.wrapper.classList.contains( 'paused' );
+ if( config.pause ) {
+ var wasPaused = dom.wrapper.classList.contains( 'paused' );
- cancelAutoSlide();
- dom.wrapper.classList.add( 'paused' );
+ cancelAutoSlide();
+ dom.wrapper.classList.add( 'paused' );
- if( wasPaused === false ) {
- dispatchEvent( 'paused' );
+ if( wasPaused === false ) {
+ dispatchEvent( 'paused' );
+ }
}
}