From 2b3369c42933e0fe8a7e4badaeaeb25e0a8f985d Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 31 Jul 2010 13:28:06 +0000 Subject: twittperator のプラグイン git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38105 d0d07461-0603-4401-acd4-de1884942a52 --- twittperator/echo-tweet.tw | 15 +++++++++++++++ twittperator/urusai-namakubi.tw | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 twittperator/echo-tweet.tw create mode 100755 twittperator/urusai-namakubi.tw diff --git a/twittperator/echo-tweet.tw b/twittperator/echo-tweet.tw new file mode 100755 index 0000000..ff85e79 --- /dev/null +++ b/twittperator/echo-tweet.tw @@ -0,0 +1,15 @@ +/* + * Please write the below line into .vimperatorrc. + * let g:twittperator_plugin_echo_tweet = 1 + */ + +(function () { + plugins.twittperator.ChirpUserStream.addListener( + function onMsg (msg, raw) { + if (msg.text) + liberator.echo(msg.user.screen_name + ": " + msg.text, commandline.FORCE_SINGLELINE); + } + ); +})(); + +// vim: sw=2 ts=2 et fdm=marker ft=javascript: diff --git a/twittperator/urusai-namakubi.tw b/twittperator/urusai-namakubi.tw new file mode 100755 index 0000000..9e876f4 --- /dev/null +++ b/twittperator/urusai-namakubi.tw @@ -0,0 +1,20 @@ +/* + * Please write the below line into .vimperatorrc. + * let g:twittperator_plugin_urusai_namakubi = 1 + */ + + +(function () { + if (!plugins.namakubi) + return; + + plugins.twittperator.ChirpUserStream.addListener( + function onMsg (msg, raw) { + liberator.log(msg.text); + if (msg.text) + plugins.namakubi.talk(msg.user.screen_name + ": " + msg.text); + } + ); +})(); + +// vim: sw=2 ts=2 et fdm=marker ft=javascript: -- cgit v1.2.3