diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-01-31 16:48:55 +0100 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-01-31 16:48:55 +0100 |
commit | c49f76d2714ac54b4acbd49a04f28f5cbc9a006e (patch) | |
tree | 135595c0bceb496672641fb2f59dd50330f7024d /plugin | |
parent | dc159f2825feb50ae4c0cee085ff1d91084c0760 (diff) | |
parent | 1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3 (diff) | |
download | perl-software-in-gnu-guix-c49f76d2714ac54b4acbd49a04f28f5cbc9a006e.tar perl-software-in-gnu-guix-c49f76d2714ac54b4acbd49a04f28f5cbc9a006e.tar.gz |
Merge branch 'master' of github.com:hakimel/reveal.js into dev
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/notes/notes.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js index 88f98d6..46bf5de 100644 --- a/plugin/notes/notes.js +++ b/plugin/notes/notes.js @@ -50,7 +50,7 @@ var RevealNotes = (function() { /** * Posts the current slide data to the notes window */ - function post() { + function post(event) { var slideElement = Reveal.getCurrentSlide(), notesElement = slideElement.querySelector( 'aside.notes' ); @@ -64,6 +64,15 @@ var RevealNotes = (function() { state: Reveal.getState() }; + // Look for notes defined in a fragment, if it is a fragmentshown event + if (event && event.hasOwnProperty('fragment')) { + var innerNotes = event.fragment.querySelector( 'aside.notes' ); + + if ( innerNotes) { + notesElement = innerNotes; + } + } + // Look for notes defined in a slide attribute if( slideElement.hasAttribute( 'data-notes' ) ) { messageData.notes = slideElement.getAttribute( 'data-notes' ); |