A reveal.js plugin to skip fragment animations on a slide by pressing a shortcut key.
You have prepared your beautiful presentation and have taken great care in choosing how to step through all the fragments in each slide, but when you are presenting you may need to go a bit faster than anticipated and just skip to the end of all fragments.
This plugin is here just for that, by adding:
- a shortcut to show all fragments in current slide;
- a shortcut to hide all fragments in current slide.
A little caveat: terms like "show" are used here as synonyms
for "activate", so it just means that the fragment
"does its thing", which may actually mean being hidden
(e.g. fade-out
fragments).
Copy this repository into the plugins folder of your reveal.js presentation, ie plugin/skip-fragments
.
Add the plugin to the dependencies in your presentation, as below.
Reveal.initialize({
// ...
dependencies: [
// ...
{ src: 'plugin/skip-fragments/skip-fragments.js' },
]
});
The simplest way to use the plugin requires no additional configuration: while you are presenting, just press:
V
to show (view) all fragments;C
to hide (conceal) all fragments.
You can customize the shortcuts with skipFragmentsShowShortcut
and skipFragmentsHideShortcut
parameters of your configuration.
Reveal.initialize({
// ...
// Shortcut for showing all fragments
skipFragmentsShowShortcut: 'V',
// Shortcut for hiding all fragments
skipFragmentsHideShortcut: 'C',
});
The plugin API is accessible from the global SkipFragments
object.
// Programmatically show all fragments on current slide
SkipFragments.showAll();
// Programmatically hide all fragments on current slide
SkipFragments.hideAll();
Copyright (C) 2018 Damiano Salvi