From 22bde63d6337b1bb97784253baeb7b5ceed7ca3d Mon Sep 17 00:00:00 2001 From: mattn Date: Wed, 22 Oct 2008 02:06:43 +0000 Subject: follow latest vimperator. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@21812 d0d07461-0603-4401-acd4-de1884942a52 --- uaSwitch.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'uaSwitch.js') diff --git a/uaSwitch.js b/uaSwitch.js index f759fd1..4f2f39c 100644 --- a/uaSwitch.js +++ b/uaSwitch.js @@ -26,11 +26,13 @@ }); // register Vimperator command - liberator.commands.addUserCommand(['ua'], 'Switch User Agent', function(arg, special){ + liberator.modules.commands.addUserCommand(['ua'], 'Switch User Agent', function(arg, special){ + arg = arg.string; if (special) useragentswitcher_options(); else if (!arg) liberator.echo('UserAgent: ' + getItems().filter(function(n) n.checked)[0].label); else window.eval(getItems().filter(function(n) n.label == arg)[0].oncommand); }, { + bang: true, completer: function(filter, special) [0, getItems().map(function(n) [n.label, n.label])] }); -- cgit v1.2.3