From 14aff66312333513f75a30f50ed0eb66a40726ed Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 16 May 2009 17:29:55 +0000 Subject: [count] に対応 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@33359 d0d07461-0603-4401-acd4-de1884942a52 --- pino.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'pino.js') diff --git a/pino.js b/pino.js index f081ad9..5aae502 100644 --- a/pino.js +++ b/pino.js @@ -40,13 +40,13 @@ var PLUGIN_INFO = http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/pino.js snaka MIT style license - 1.1.2 + 1.2.0 で先頭のn件(デフォルト5件、グローバル変数で調整可能) をバックグラウンドのタブで開きます。 で補完候補の一覧にピンを立てた記事の一覧から選択することもできます。 + count を指定すると、その件数だけ開きます。 == グローバル変数 == g:pinoOpenItemsCount: @@ -137,11 +138,11 @@ liberator.plugins.pino.api = (function() { commands.addUserCommand( ["pinneditemopen", "pino"], "Open livedoor Reader pinned item", - function(args, bang) { + function(args) { let pins = new Pins(); if (args.string == "") { let pin; - let max = openItemsCount(); + let max = (args.count >= 1) ? args.count : openItemsCount(); for(let i = 0; i < max; i++) { if (!(pin = pins.head())) break; liberator.open(pin.link, openBehavior()); @@ -154,6 +155,7 @@ liberator.plugins.pino.api = (function() { }, { literal: 0, + count: true, completer: function(context) { var pins = new Pins(); context.title = ["title", "url"]; -- cgit v1.2.3