diff options
author | anekos | 2008-12-02 12:07:57 +0000 |
---|---|---|
committer | anekos | 2008-12-02 12:07:57 +0000 |
commit | b99a31711c4a5f6967630d103d2245628619d2e2 (patch) | |
tree | 354fd2afc98aacf58e309fe98a45c1173784dc18 /umihara.js | |
parent | eae4fae848458cfd438f7746c302f877e03ebec1 (diff) | |
download | vimperator-plugins-b99a31711c4a5f6967630d103d2245628619d2e2.tar.bz2 |
Follow CVS Head.
etc.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@25706 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'umihara.js')
-rw-r--r-- | umihara.js | 20 |
1 files changed, 7 insertions, 13 deletions
@@ -22,7 +22,7 @@ const re = /<td nowrap>(\d+:\d+)<\/td><td>([\d,]+\.[\d,]+)<\/td><td><b>([\d,]+\.[\d,]+)<\/b><\/td><\/tr><\/table><\/div>/; - const cl = [ + const ContryCodes = [ ['USD', '\u30a2\u30e1\u30ea\u30ab\u30c9\u30eb'], ['GBP', '\u30a4\u30ae\u30ea\u30b9 \u30dd\u30f3\u30c9'], ['INR', '\u30a4\u30f3\u30c9 \u30eb\u30d4\u30fc'], @@ -93,17 +93,11 @@ let extra = { argCount: '+', bang: true, - completer: function (context, arg, bang) { + completer: function (context, args) { let last = context.contextList.slice(-1)[0]; - context.title = ['Country Code']; + context.title = ['Country Code', 'Country Name']; context.advance(last.offset - last.caret); - context.items = completion.filter(cl, last.filter); - /* - if (!(arg = commands.parseArgs(arg, extra.options, extra.argCount))) - return [0, []]; - let m = arg.string.match(/\s(\w+)$/); - return [(m ? m.index : arg.string.length) + 1, m ? completion.filter(cl, m[1]) : cl]; - */ + context.completions = ContryCodes; } }; @@ -111,10 +105,10 @@ commands.addUserCommand( ['kawase'], 'Umihara Kawase Meow', - function (arg, clipboard) { - let [value, from, to] = arg.arguments; + function (args) { + let [value, from, to] = args; value = eval(value); - kawase(value, clipboard, from, to); + kawase(value, args.bang, from, to); }, extra, true |