From f2fded5246b370d8f38a4643094f3a054556eeda Mon Sep 17 00:00:00 2001 From: aereal Date: Sun, 19 Jun 2011 17:17:58 +0900 Subject: ignore sub-diary accounts when not specified a host of Hatena Diary --- access_hatena.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'access_hatena.js') diff --git a/access_hatena.js b/access_hatena.js index 2f82fa1..b291b02 100644 --- a/access_hatena.js +++ b/access_hatena.js @@ -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; } } } -- cgit v1.2.3