aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-09-27 16:19:39 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-09-27 16:19:39 +0200
commit0aad39f75532b17bff72cbad38794d536406e8b9 (patch)
treec8a82cdc98d9befc444f3448229648e3ee499a37
parent80fc214af1b93ba83c385c92df7806dfd98927c6 (diff)
downloadperl-software-in-gnu-guix-0aad39f75532b17bff72cbad38794d536406e8b9.tar
perl-software-in-gnu-guix-0aad39f75532b17bff72cbad38794d536406e8b9.tar.gz
dont open notes when S is pressed inside of notes window #991
-rw-r--r--plugin/notes/notes.js31
1 files changed, 18 insertions, 13 deletions
diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js
index a0b6a5a..27199af 100644
--- a/plugin/notes/notes.js
+++ b/plugin/notes/notes.js
@@ -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 };
+
})();