Created
May 21, 2012 03:47
-
-
Save alagu/2760474 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).keydown(function(e) { | |
if (event.keyCode === 13) { | |
if ((navigator.userAgent.indexOf('Mac OS X') !== -1) && e.metaKey) { | |
return saveBookmark(); | |
} else if ((navigator.userAgent.indexOf('Mac OS X') === -1) && e.ctrlKey) { | |
return saveBookmark(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment