aboutsummaryrefslogtreecommitdiffstats
path: root/exopen.js
diff options
context:
space:
mode:
authorpekepeke2009-01-10 17:20:50 +0000
committerpekepeke2009-01-10 17:20:50 +0000
commit6fee006d7010db688afc8ef9c8bdc91770b383bc (patch)
treef4225f0dcba3874b9d8cd42ffbd3780983f17cec /exopen.js
parent852108dd75a2650e2679b4fa7708aadc104e9a29 (diff)
downloadvimperator-plugins-6fee006d7010db688afc8ef9c8bdc91770b383bc.tar.bz2
補完時のラベル修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@28284 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'exopen.js')
-rw-r--r--exopen.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/exopen.js b/exopen.js
index 5583d28..64fc89b 100644
--- a/exopen.js
+++ b/exopen.js
@@ -163,10 +163,10 @@ liberator.plugins.exOpen = (function(){
},
registerCommand: function(){
var self = this;
- commands.addUserCommand(['exopen'], 'Open byextension url',
+ commands.addUserCommand(['exopen'], 'Open byextension url',
function(args) self.open(args.string, args.bang), {
completer: function(context, args) {
- context.title = ['Template', 'Value'];
+ context.title = ['Template', 'Description - Value'];
if (!context.filter) {
context.completions = self.completer;
return;
@@ -186,12 +186,13 @@ liberator.plugins.exOpen = (function(){
if (!arg) return;
var template = this.find(arg) || {value: arg};
if (typeof template.custom == 'function') {
- url = replacer(template.custom.call(this, template.value), template.escape);
+ url = template.custom.call(this, template.value);
} else if (template.custom instanceof Array){
url = replacer(template.value).replace(template.custom[0], template.custom[1], template.escape);
} else {
url = replacer(template.value, template.escape);
}
+ if (!url) return;
if (template.newtab) openTabOrSwitch(url);
else liberator.open(url);
}