aboutsummaryrefslogtreecommitdiff
path: root/plugin/notes/notes.html
diff options
context:
space:
mode:
authorMichael Kühnel <mail@michael-kuehnel.de>2012-10-24 14:33:16 +0200
committerMichael Kühnel <mail@michael-kuehnel.de>2012-10-24 14:33:16 +0200
commit296242f8d3d5f5513d5278e72941ef868c3cb4e5 (patch)
treed43c6b42e02b0f27c2b124c88bec8ddc6e927543 /plugin/notes/notes.html
parent76a7bd83faa2ecd9c5442a6037e86084a574ab00 (diff)
downloadfreenode-live-2017-presentation-296242f8d3d5f5513d5278e72941ef868c3cb4e5.tar
freenode-live-2017-presentation-296242f8d3d5f5513d5278e72941ef868c3cb4e5.tar.gz
Make the fragments visible in speaker notes
Diffstat (limited to 'plugin/notes/notes.html')
-rw-r--r--plugin/notes/notes.html23
1 files changed, 17 insertions, 6 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 485edec..c69950b 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -109,12 +109,15 @@
window.addEventListener( 'message', function( event ) {
var data = JSON.parse( event.data );
-
- if( data.markdown ) {
- notes.innerHTML = (new Showdown.converter()).makeHtml( data.notes );
- }
- else {
- notes.innerHTML = data.notes;
+ console.log(data);
+ // No need for updating the notes in case of fragement changes
+ if ( data.notes !== undefined) {
+ if( data.markdown ) {
+ notes.innerHTML = (new Showdown.converter()).makeHtml( data.notes );
+ }
+ else {
+ notes.innerHTML = data.notes;
+ }
}
// Kill the slide listeners while responding to the event
@@ -124,6 +127,14 @@
currentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv );
nextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv );
+ // Showing and hiding fragments
+ if (data.fragment === 'next') {
+ currentSlide.contentWindow.Reveal.nextFragment();
+ }
+ else if (data.fragment === 'prev') {
+ currentSlide.contentWindow.Reveal.prevFragment();
+ }
+
// Resume listening on the next cycle
setTimeout( addSlideListeners, 1 );