aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2020-05-08 20:49:06 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2020-05-08 20:49:06 +0200
commit772fa0308da0687dc11455cffc80cf6d9df79186 (patch)
tree4d556d6d95bf6891da27cb4d22fd547b20d186dd /js
parent3a032a836a9a5f12ef3ccc4d94e976ee0bb22e51 (diff)
downloadfosdem-2021-minimalism-presentation-772fa0308da0687dc11455cffc80cf6d9df79186.tar
fosdem-2021-minimalism-presentation-772fa0308da0687dc11455cffc80cf6d9df79186.tar.gz
make it possible to disable hash change listener with respondToHashChanges: false
Diffstat (limited to 'js')
-rw-r--r--js/config.js3
-rw-r--r--js/reveal.js2
2 files changed, 4 insertions, 1 deletions
diff --git a/js/config.js b/js/config.js
index 0419f99..dd5e843 100644
--- a/js/config.js
+++ b/js/config.js
@@ -62,6 +62,9 @@ export default {
// page/copying the URL will return you to the same slide
hash: false,
+ // Flags if we should monitor the hash and change slides accordingly
+ respondToHashChanges: true,
+
// Push each slide change to the browser history. Implies `hash: true`
history: false,
diff --git a/js/reveal.js b/js/reveal.js
index db6c4aa..1a4a34d 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -487,8 +487,8 @@ export default function( revealElement, options ) {
if( config.touch ) touch.bind();
if( config.keyboard ) keyboard.bind();
if( config.progress ) progress.bind();
+ if( config.respondToHashChanges ) location.bind();
controls.bind();
- location.bind();
dom.slides.addEventListener( 'transitionend', onTransitionEnd, false );
dom.pauseOverlay.addEventListener( 'click', resume, false );