diff options
-rw-r--r-- | google-plus-commando.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/google-plus-commando.js b/google-plus-commando.js index 59ec7ae..c1de05c 100644 --- a/google-plus-commando.js +++ b/google-plus-commando.js @@ -305,9 +305,11 @@ let INFO = // Commands {{{ const Commands = { - moveEntry: function (arrow, vim) { + moveEntry: function (next) { + let [arrow, vim, dir] = next ? ['<Down>', 'j', 'next'] : ['<Up>', 'k', 'prev']; + if (Elements.viewer) - return click(Elements.viewer.next); + return click(Elements.viewer[dir]); let arrowTarget = (function () { let notifications = Elements.frames.notifications; @@ -324,8 +326,8 @@ let INFO = arrowTarget ? [arrow, ['keypress'], arrowTarget] : [vim, ['vkeypress'], Elements.doc] ); }, - next: withCount(function () Commands.moveEntry('<Down>', 'j')), - prev: withCount(function () Commands.moveEntry('<Up>', 'k')), + next: withCount(function () Commands.moveEntry(true)), + prev: withCount(function () Commands.moveEntry(false)), comment: function() { let entry = Elements.currentEntry; click(entry.comment); |