aboutsummaryrefslogtreecommitdiffstats
path: root/access_hatena.js
diff options
context:
space:
mode:
authorGael Pasgrimaud2011-06-25 10:15:32 +0200
committerGael Pasgrimaud2011-06-25 10:15:32 +0200
commitb5269a892b3a7dcb89c9c1913797b3d74ff1c476 (patch)
treeb3e06d958238cd3c8f2cb0922e588c64c40e54a3 /access_hatena.js
parent95f5752645a1948a3f3d29471fbb7eeb98a4ecaa (diff)
parentd4e2c5327d707808086d3c1f020e884972698b21 (diff)
downloadvimperator-plugins-b5269a892b3a7dcb89c9c1913797b3d74ff1c476.tar.bz2
Merge branch 'master' of git://github.com/vimpr/vimperator-plugins
Diffstat (limited to 'access_hatena.js')
-rw-r--r--access_hatena.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/access_hatena.js b/access_hatena.js
index 3cb56ce..b291b02 100644
--- a/access_hatena.js
+++ b/access_hatena.js
@@ -133,7 +133,7 @@ map ; :accesshatena
root.containerOpen = true;
for (var i = 0, length = root.childCount; i < length; i++) {
var page = root.getChild(i);
- page.uri.match('^https?://([a-zA-Z0-9.]+)\\.hatena\\.ne\\.jp/([a-zA-Z][a-zA-Z0-9_-]{1,30}[a-zA-Z0-9]/?)?');
+ page.uri.match('^https?://([a-zA-Z0-9.]+)\\.hatena\\.ne\\.jp/([a-zA-Z][a-zA-Z0-9_-]{1,30}[a-zA-Z0-9](?:\\+[a-zA-Z0-9_-]{1,30})?/?)?');
var host = RegExp.$1;
var id = RegExp.$2;
var _recent_hosts_length = recentHosts.length;
@@ -218,7 +218,8 @@ map ; :accesshatena
} else if (args.length == 2) {
var host = args[0].toString();
context.title = ["ID", "Page"];
- context.completions = [[ids[i], title.get(host, ids[i])] for (i in ids) if (ids.hasOwnProperty(i))];
+ var _completions = [[ids[i], title.get(host, ids[i])] for (i in ids) if (ids.hasOwnProperty(i))];
+ context.completions = host != 'd' ? _completions.filter(function(i){ return !/\+/.test(i[0]) }) : _completions;
}
}
}