aboutsummaryrefslogtreecommitdiff
path: root/plugin/notes/notes.html
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-07-26 09:48:21 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-07-26 09:48:21 -0400
commit03385d7245f8c0428b5f8d8578022fb3a60fdd12 (patch)
treeb4fc77ce729d8228b47da5bdb775d980e68d80d7 /plugin/notes/notes.html
parent8bf19ab61f8eb0e527348110f3923a33ea937eaa (diff)
downloadfosdem-2018-presentation-03385d7245f8c0428b5f8d8578022fb3a60fdd12.tar
fosdem-2018-presentation-03385d7245f8c0428b5f8d8578022fb3a60fdd12.tar.gz
simplify client side notes plugin
Diffstat (limited to 'plugin/notes/notes.html')
-rw-r--r--plugin/notes/notes.html16
1 files changed, 4 insertions, 12 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 8af43fb..9151663 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -173,6 +173,7 @@
window.addEventListener( 'message', function( event ) {
var data = JSON.parse( event.data );
+
// No need for updating the notes in case of fragment changes
if ( data.notes !== undefined) {
if( data.markdown ) {
@@ -183,18 +184,9 @@
}
}
- // Showing and hiding fragments
- if( data.fragment === 'next' ) {
- currentSlide.contentWindow.Reveal.nextFragment();
- }
- else if( data.fragment === 'prev' ) {
- currentSlide.contentWindow.Reveal.prevFragment();
- }
- else {
- // Update the note slides
- currentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv );
- nextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv );
- }
+ // Update the note slides
+ currentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv, data.indexf );
+ nextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv );
}, false );