aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugin/notes/notes.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/notes/notes.js')
-rw-r--r--plugin/notes/notes.js33
1 files changed, 19 insertions, 14 deletions
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js
index a0b6a5a..e42329d 100644
--- a/plugin/notes/notes.js
+++ b/plugin/notes/notes.js
@@ -28,7 +28,7 @@ var RevealNotes = (function() {
notesPopup.postMessage( JSON.stringify( {
namespace: 'reveal-notes',
type: 'connect',
- url: window.location.protocol + '//' + window.location.host + window.location.pathname,
+ url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
state: Reveal.getState()
} ), '*' );
}, 500 );
@@ -96,22 +96,27 @@ var RevealNotes = (function() {
connect();
}
- // 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
- document.addEventListener( 'keydown', function( event ) {
- // Disregard the event if the target is editable or a
- // modifier is present
- if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
+ if( !/receiver/i.test( window.location.search ) ) {
- if( event.keyCode === 83 ) {
- event.preventDefault();
+ // If the there's a 'notes' query set, open directly
+ if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
openNotes();
}
- }, false );
+
+ // Open the notes when the 's' key is hit
+ document.addEventListener( 'keydown', function( event ) {
+ // Disregard the event if the target is editable or a
+ // modifier is present
+ if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
+
+ if( event.keyCode === 83 ) {
+ event.preventDefault();
+ openNotes();
+ }
+ }, false );
+
+ }
return { open: openNotes };
+
})();