From da23d682c63a4f3ee04a42ae70222950b2888daa Mon Sep 17 00:00:00 2001 From: Malcolm Young Date: Fri, 17 Feb 2017 15:08:57 +0000 Subject: allow configuration of which view slide number appears on - fixes #1791 --- js/reveal.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 9251dc0..574c943 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -57,6 +57,9 @@ // Display the page number of the current slide slideNumber: false, + + // Determine which displays to show the slide number on + showSlideNumber: 'all', // Push each slide change to the browser history history: false, @@ -977,7 +980,18 @@ dom.controls.style.display = config.controls ? 'block' : 'none'; dom.progress.style.display = config.progress ? 'block' : 'none'; - dom.slideNumber.style.display = config.slideNumber && !isPrintingPDF() ? 'block' : 'none'; + + var slideNumberDisplay = 'none'; + if (config.slideNumber && !isPrintingPDF()) { + if (config.showSlideNumber === 'all') { + slideNumberDisplay = 'block'; + } + else if (config.showSlideNumber === 'notes' && isSpeakerNotes()) { + slideNumberDisplay = 'block'; + } + } + + dom.slideNumber.style.display = slideNumberDisplay; if( config.shuffle ) { shuffle(); -- cgit v1.2.3