summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-09-03 00:30:16 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-09-03 00:32:13 +0200
commit56ba4a189059969aad47f3b21b12676e4b7a84c3 (patch)
treef6c700d1de18ca2eff2ec8404bf5e54f482b4369 /js
parent144da1ca88f905910b9be63b8710ccab16a04df2 (diff)
left and right arrow now also jump to previous/next article
Diffstat (limited to 'js')
-rw-r--r--js/items.js1
-rw-r--r--js/main.js4
2 files changed, 2 insertions, 3 deletions
diff --git a/js/items.js b/js/items.js
index 146f70a01..b9cb97551 100644
--- a/js/items.js
+++ b/js/items.js
@@ -113,7 +113,6 @@ var t = t || function(app, string){ return string; }; // mock translation for lo
var notJumped = true;
$('.feed_item').each(function(){
if(notJumped && $(this).position().top > 1){
- console.log(this);
self._jumpToElemenId($(this).data('id'));
notJumped = false;
}
diff --git a/js/main.js b/js/main.js
index ef97cd925..757fd088c 100644
--- a/js/main.js
+++ b/js/main.js
@@ -128,12 +128,12 @@ $(document).ready(function(){
});
$(document).keydown(function(e) {
- if ((e.keyCode || e.which) == 74) { // 'j' key shortcut
+ if ((e.keyCode || e.which) == 74 || (e.keyCode || e.which) == 39) { // 'j' key shortcut
if(!$('.dialog').is(':visible')){
News.Objects.Items.jumpToNext();
}
}
- if ((e.keyCode || e.which) == 75) { // 'k' key shortcut
+ if ((e.keyCode || e.which) == 75 || (e.keyCode || e.which) == 37) { // 'k' key shortcut
if(!$('.dialog').is(':visible')){
News.Objects.Items.jumpToPrevious();
}