aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2018-07-02 11:08:45 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2018-07-02 11:08:45 +0200
commitb9bb353a11bb7bcd1f79a40a80e0d5dfcca05591 (patch)
tree4adab8ecbbce1db6a785700503d142dbad04c735 /js
parentfd95c8c266b775227762db62c0cbed3c05955525 (diff)
downloadperl-software-in-gnu-guix-b9bb353a11bb7bcd1f79a40a80e0d5dfcca05591.tar
perl-software-in-gnu-guix-b9bb353a11bb7bcd1f79a40a80e0d5dfcca05591.tar.gz
add 'resume presentation' button to pause overlay
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 93ed446..103fa82 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -593,7 +593,8 @@
dom.speakerNotes.setAttribute( 'tabindex', '0' );
// Overlay graphic which is displayed during the paused mode
- createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null );
+ dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', '<button class="resume-button">Resume presentation</button>' );
+ dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' );
dom.wrapper.setAttribute( 'role', 'application' );
@@ -1298,6 +1299,8 @@
dom.progress.addEventListener( 'click', onProgressClicked, false );
}
+ dom.resumeButton.addEventListener( 'click', resume, false );
+
if( config.focusBodyOnPageVisibilityChange ) {
var visibilityChange;
@@ -1361,6 +1364,8 @@
dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );
dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );
+ dom.resumeButton.removeEventListener( 'click', resume, false );
+
if ( config.progress && dom.progress ) {
dom.progress.removeEventListener( 'click', onProgressClicked, false );
}