aboutsummaryrefslogtreecommitdiff
path: root/plugin/notes/notes.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/notes/notes.js')
-rw-r--r--plugin/notes/notes.js32
1 files changed, 21 insertions, 11 deletions
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js
index 8d58ad0..718d149 100644
--- a/plugin/notes/notes.js
+++ b/plugin/notes/notes.js
@@ -151,20 +151,30 @@ var RevealNotes = (function() {
}
- if( !/receiver/i.test( window.location.search ) ) {
+ return {
+ init: function() {
- // If the there's a 'notes' query set, open directly
- if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
- openNotes();
- }
+ if( !/receiver/i.test( window.location.search ) ) {
+
+ // If the there's a 'notes' query set, open directly
+ if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
+ openNotes();
+ }
- // Open the notes when the 's' key is hit
- Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() {
- openNotes();
- } );
+ // Open the notes when the 's' key is hit
+ Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() {
+ openNotes();
+ } );
- }
+ }
+
+ return Promise.resolve();
- return { open: openNotes };
+ },
+
+ open: openNotes
+ };
})();
+
+Reveal.registerPlugin( 'notes', RevealNotes );