From d853d84bc3fe4b508f270a9928ed1612460e6249 Mon Sep 17 00:00:00 2001 From: anekos Date: Wed, 13 Jul 2011 03:53:28 +0900 Subject: エントリ移動のマッピングを count 対応にした --- google-plus-commando.js | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/google-plus-commando.js b/google-plus-commando.js index a289ff2..052adac 100644 --- a/google-plus-commando.js +++ b/google-plus-commando.js @@ -35,7 +35,7 @@ THE POSSIBILITY OF SUCH DAMAGE. // INFO {{{ let INFO = <> - ', ['keypress'], menus[0]] : ['j', ['vkeypress'], Elements.doc] ); - }, - prev: function () { + }), + prev: withCount(function () { let menus = A(Elements.doc.querySelectorAll('[tabindex="0"][role="menu"]')); plugins.feedSomeKeys_3.API.feed.apply( null, menus.length === 1 ? ['', ['keypress'], menus[0]] : ['k', ['vkeypress'], Elements.doc] ); - }, + }), comment: function() Elements.currentEntry.click('comment'), plusone: function() Elements.currentEntry.click('plusone'), share: function() Elements.currentEntry.click('share'), @@ -160,14 +169,16 @@ let INFO = ]; if (!gv) return; + let func = Commands[cmd]; mappings.addUserMap( [modes.NORMAL], gv.split(/\s+/), cmd + ' - Google plus Commando', - function () { - Commands[cmd](); + function (count) { + func(count); }, { + count: func.length === 1, matchingUrls: RegExp('^https://plus\\.google\\.com/*') } ); -- cgit v1.2.3