Skip to content

Commit

Permalink
Tidy cpan.js
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Apr 19, 2015
1 parent a70bedd commit e9da476
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions root/static/js/cpan.js
Expand Up @@ -81,8 +81,13 @@ $(document).ready(function() {
});

// Global keyboard shortcuts
Mousetrap.bind('?', function() { $('#keyboard-shortcuts').modal(); });
Mousetrap.bind('s', function(e) { $('#search-input').focus(); e.preventDefault(); });
Mousetrap.bind('?', function() {
$('#keyboard-shortcuts').modal();
});
Mousetrap.bind('s', function(e) {
$('#search-input').focus();
e.preventDefault();
});

$('a[data-keyboard-shortcut]').each(function(index, element) {
Mousetrap.bind($(element).data('keyboard-shortcut'), function() {
Expand Down

0 comments on commit e9da476

Please sign in to comment.