diff options
author | anderslemke <mail@anderslemke.dk> | 2018-08-15 19:45:48 +0200 |
---|---|---|
committer | anderslemke <mail@anderslemke.dk> | 2018-08-15 19:58:18 +0200 |
commit | f52460a6fd83d2b59f8f4f9cbb45fa1930c9666a (patch) | |
tree | 030a4b62e75e6c19cda3428d25c18e79033f9e99 /js | |
parent | 249f0139598b20d02263b81a76f1ff87f8e74225 (diff) | |
download | perl-software-in-gnu-guix-f52460a6fd83d2b59f8f4f9cbb45fa1930c9666a.tar perl-software-in-gnu-guix-f52460a6fd83d2b59f8f4f9cbb45fa1930c9666a.tar.gz |
Only show resume on pause if controls enabled
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/js/reveal.js b/js/reveal.js index 3c31b97..b071cc3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -593,8 +593,7 @@ dom.speakerNotes.setAttribute( 'tabindex', '0' ); // Overlay graphic which is displayed during the paused mode - dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', '<button class="resume-button">Resume presentation</button>' ); - dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' ); + dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', config.controls ? '<button class="resume-button">Resume presentation</button>' : null ); dom.wrapper.setAttribute( 'role', 'application' ); @@ -1299,7 +1298,7 @@ dom.progress.addEventListener( 'click', onProgressClicked, false ); } - dom.resumeButton.addEventListener( 'click', resume, false ); + dom.pauseOverlay.addEventListener( 'click', resume, false ); if( config.focusBodyOnPageVisibilityChange ) { var visibilityChange; @@ -1364,7 +1363,7 @@ dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false ); dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false ); - dom.resumeButton.removeEventListener( 'click', resume, false ); + dom.pauseOverlay.removeEventListener( 'click', resume, false ); if ( config.progress && dom.progress ) { dom.progress.removeEventListener( 'click', onProgressClicked, false ); |