From c5f809ba95abfc4a1e15220f036a8bc4cd333762 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 18 Jul 2011 14:02:56 +0900 Subject: viewer の [next][prev] がばぐてた --- google-plus-commando.js | 10 ++++++---- 1 file 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 ? ['', 'j', 'next'] : ['', '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('', 'j')), - prev: withCount(function () Commands.moveEntry('', 'k')), + next: withCount(function () Commands.moveEntry(true)), + prev: withCount(function () Commands.moveEntry(false)), comment: function() { let entry = Elements.currentEntry; click(entry.comment); -- cgit v1.2.3