From 17b7844e3ea66d3c8e61de39c7b6b2d415a4d16b Mon Sep 17 00:00:00 2001 From: anekos Date: Tue, 11 May 2010 12:05:00 +0000 Subject: しぼりこみ変更 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37452 d0d07461-0603-4401-acd4-de1884942a52 --- foxage2ch.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'foxage2ch.js') diff --git a/foxage2ch.js b/foxage2ch.js index 0b6e00e..869acea 100755 --- a/foxage2ch.js +++ b/foxage2ch.js @@ -97,9 +97,9 @@ let INFO = let svc = FoxAge2chUtils.service; const Status = { - Live: 0, - New: 2, - Dead: 4 + live: 0, + new: 2, + dead: 4 }; const StatusIcon = { @@ -137,9 +137,11 @@ let INFO = { literal: 0, options: [ - [['-live', '-l'], commands.OPTION_NOARG], - [['-dead', '-d'], commands.OPTION_NOARG], - [['-new', '-n'], commands.OPTION_NOARG], + [ + ['-status', '-s'], + commands.OPTION_STRING, + null, + [[v, StatusIcon[k]] for ([v, k] in Iterator(Status))]] ], completer: function (context, args) { context.completions = [ @@ -150,11 +152,7 @@ let INFO = ] for ([idx, thread] in Iterator(threads())) if ( - (!args['-live'] || thread.status === Status.Live) - && - (!args['-dead'] || thread.status === Status.Dead) - && - (!args['-new'] || thread.status === Status.New) + (!('-status' in args) || (thread.status === Status[args['-status']])) ) ]; } -- cgit v1.2.3