Added hotkey for next/prev page

This commit is contained in:
Marcin Kurczewski 2013-10-25 17:14:01 +02:00
parent 5c76a41ae7
commit 0eb1ef4fff

View file

@ -210,4 +210,6 @@ $(function()
Mousetrap.bind('q', function() { $('#top-nav input').focus(); return false; }); Mousetrap.bind('q', function() { $('#top-nav input').focus(); return false; });
Mousetrap.bind('w', function() { $('body,html').animate({scrollTop: '-=150px'}, 200); }); Mousetrap.bind('w', function() { $('body,html').animate({scrollTop: '-=150px'}, 200); });
Mousetrap.bind('s', function() { $('body,html').animate({scrollTop: '+=150px'}, 200); }); Mousetrap.bind('s', function() { $('body,html').animate({scrollTop: '+=150px'}, 200); });
Mousetrap.bind('a', function() { var url = $('.paginator .prev:not(.disabled) a').attr('href'); if (typeof url !== 'undefined') window.location.href = url; });
Mousetrap.bind('d', function() { var url = $('.paginator .next:not(.disabled) a').attr('href'); if (typeof url !== 'undefined') window.location.href = url; });
}); });