diff options
author | anekos | 2010-08-24 16:48:34 +0000 |
---|---|---|
committer | anekos | 2010-08-24 16:48:34 +0000 |
commit | 32775cd9d1861ebb1564c56808308b4db4675aaa (patch) | |
tree | 763fa61889256b65fcfe7b3be8940beada02dbb7 /twittperator.js | |
parent | 5fc19f0bfe4b7f772b77a161ae87b95f35aeaf3f (diff) | |
download | vimperator-plugins-32775cd9d1861ebb1564c56808308b4db4675aaa.tar.bz2 |
tw!info追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38351 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-x | twittperator.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/twittperator.js b/twittperator.js index 8493d08..f09d13a 100755 --- a/twittperator.js +++ b/twittperator.js @@ -28,7 +28,7 @@ let PLUGIN_INFO = <name>twittperator</name> <description>Twitter Client using ChirpStream</description> <description lang="ja">OAuth対応Twitterクライアント</description> - <version>1.3.0</version> + <version>1.4.0</version> <minVersion>2.3</minVersion> <maxVersion>2.4</maxVersion> <author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author> @@ -1784,6 +1784,28 @@ let PLUGIN_INFO = Twitter.destroy(m[0]); }, completer: Completers.id(seleceMine) + }), + SubCommand({ + command: ["info"], + description: "Display status information", + action: function(arg) { + function dtdd(obj) { + let items = <></>; + for (let [n, v] in Iterator(obj)) { + let cont = (v && typeof v === "object") ? dtdd(v) : v; + items += <><dt>{n}</dt><dd>{cont}</dd></>; + } + + return <dl>{items}</dl>; + } + + let m = arg.match(/^\d+/); + if (!m) + return; + let id = parseInt(m[0], 10); + history.filter(function(st) st.id === id).map(dtdd).forEach(liberator.echo); + }, + completer: Completers.id() }) ]; // }}} |