aboutsummaryrefslogtreecommitdiffstats
path: root/ubiquity.js
diff options
context:
space:
mode:
authorpekepeke2008-11-10 14:25:11 +0000
committerpekepeke2008-11-10 14:25:11 +0000
commit6bb9b12da9888d30f1fc904c844188affc0e7692 (patch)
treeb8f76caa1cc5d8d29390edb0c7b8f48b9ebaeef3 /ubiquity.js
parent4aabb4dfa7e5a3ff3f3330ebbf12c17cf8eba9e0 (diff)
downloadvimperator-plugins-6bb9b12da9888d30f1fc904c844188affc0e7692.tar.bz2
bug fix - 2.0preにちゃんと対応できてなかったので、ちゃんと対応させた。
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@23154 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'ubiquity.js')
-rw-r--r--ubiquity.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/ubiquity.js b/ubiquity.js
index 35c11b1..1947ec5 100644
--- a/ubiquity.js
+++ b/ubiquity.js
@@ -1,7 +1,7 @@
/**
* ==VimperatorPlugin==
* @name Ubiquity Glue
- * @description Vimperator-plugin for Ubiquity
+ * @description viperator-plugin for Ubiquity
* @depend Ubiquity (ubiquity@labs.mozilla.com)
* @version 0.1.1a
* ==/VimperatorPlugin==
@@ -32,14 +32,14 @@ if (!Application.extensions.has(ubiquityID) || !Application.extensions.get(ubiqu
Components.utils.reportError('Vimperator: UbiquityGlue: Ubiquity is not installed');
return null;
}
-function preExec(target, name, func){
+function preExec(target,name,func){
var original = target[name];
target[name] = function(){
- var result = func.apply(this, arguments);
+ var result = func.apply(this,arguments);
var tmp = null;
- if (result != false) tmp = original.apply(target, arguments);
+ if (result != false) tmp = original.apply(target,arguments);
return tmp;
- };
+ }
}
preExec(events, 'onEscape', function(){
@@ -55,7 +55,7 @@ preExec(commandline, 'open', function(){
// XXX:選択範囲が必要な操作が現状上手く動かない.不便であればコメントアウトしてください.
preExec(gUbiquity, 'openWindow', function(anchor, flag){
if(!flag) {
- liberator.commandline.open(':', 'ubiquity ', liberator.modes.EX);
+ commandline.open(':', 'ubiquity ', modes.EX);
return false;
}
});
@@ -63,7 +63,7 @@ preExec(gUbiquity, 'openWindow', function(anchor, flag){
// -------------------------------------------------
// Command
// -------------------------------------------------
-commands.addUserCommand(['ubi[quity]'], 'Vimperator Ubiquity Glue',
+commands.addUserCommand(['ubi[quity]'],'Vimperator Ubiquity Glue',
function(args){
args = (typeof args.string == 'undefined') ? args: args.string;
if (!args){
@@ -71,7 +71,7 @@ commands.addUserCommand(['ubi[quity]'], 'Vimperator Ubiquity Glue',
return;
}
ubiquityManager.execute(args);
- }, {
+ },{
completer: function(filter){
return ubiquityManager.completer(filter);
}
@@ -110,10 +110,10 @@ var ubiquityManager = {
}
},
completer: function(args){
- var matches = args.match(/(\S+)(?:\s+(.+)$)?/);
+ var matches = args.match(/([^\s]+)(?:\s+(.+)$)?/);
var suggestions = [];
- for (let cmd in this.commands){
- suggestions.push([cmd, this.commands[cmd].description]);
+ for (var cmd in this.commands){
+ suggestions.push([cmd , this.commands[cmd].description]);
}
if (!matches){
return [0, suggestions];