aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranekos2012-06-25 17:16:32 +0900
committeranekos2012-06-25 17:20:46 +0900
commitbe20b38ba3abe465f569d24d72d101a1013a38c8 (patch)
treed7d30776d868f20197bbd9cc16e4113a47b469a5
parentc6d2f727926988293e4ad3434fcc0598fc002f07 (diff)
downloadvimperator-plugins-be20b38ba3abe465f569d24d72d101a1013a38c8.tar.bz2
Recognize --url option.
-rw-r--r--direct_bookmark.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/direct_bookmark.js b/direct_bookmark.js
index 55423d3..fbb9349 100644
--- a/direct_bookmark.js
+++ b/direct_bookmark.js
@@ -796,6 +796,8 @@ for Migemo search: require XUL/Migemo Extension
if (m.test(tag) && match_result[1].indexOf('[' + tag + ']') < 0) ];
}
+ let url = arg["-u"] || buffer.URL;
+
context.fork('UserTags', 0, context, function(context){
context.title = ['User Tags', 'User Tags'];
@@ -807,20 +809,19 @@ for Migemo search: require XUL/Migemo Extension
};
/*
- * XXX: Should recognize --url option?
* TODO: Complete --url argument like :open
*/
- if (buffer.URL == lastURL){
+ if (url == lastURL){
if (done) {
onComplete(lastUserTags);
} else {
context.incomplete = true;
}
} else {
- lastURL = buffer.URL;
+ lastURL = url;
context.incomplete = true;
done = false;
- getUserTags(buffer.URL, function (tags) onComplete(tags));
+ getUserTags(url, function (tags) onComplete(tags));
}
});