Skip to content

Commit

Permalink
Do not print fragments by default with Reveal.js
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti committed Jul 17, 2016
1 parent babe081 commit a768e10
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,25 @@ Reveal.prototype = {

configure: function () {
this.page.evaluate(function () {
Reveal.configure({ controls: false, progress: false });
Reveal.configure({
controls: false,
progress: false,
fragments: false
});
});
},

slideCount: function () {
return this.page.evaluate(function () {
// TODO: the getTotalSlides API does not report the number of slides accurately as it does not take stacks and some index-less fragments into account
// TODO: the getTotalSlides API does not report the number of slides accurately
// as it does not take stacks and some index-less fragments into account
// getTotalSlides API is only available starting reveal.js version 3.0.0
return typeof Reveal.getTotalSlides === 'function' ? Reveal.getTotalSlides() : undefined;
});
},

hasNextSlide: function () {
// FIXME: does not work when there is a stack or some index-less fragments into account
return this.page.evaluate(function () {
return !Reveal.isLastSlide();
});
Expand Down

0 comments on commit a768e10

Please sign in to comment.