aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2010-09-18 01:15:21 +0000
committeranekos2010-09-18 01:15:21 +0000
commitda36143e96ca2f1cd222f7fff059c64ce208c7ef (patch)
treee466d6ff5925a771a7c706fac4b681127a1f7e25 /twittperator.js
parentc3623decfe614d477abdd05cf4bc867b26b5f19e (diff)
downloadvimperator-plugins-da36143e96ca2f1cd222f7fff059c64ce208c7ef.tar.bz2
Twittperator.onMessage を追加
補完用にユーザがダミーの履歴を突っ込めるようにするため。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38482 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-xtwittperator.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/twittperator.js b/twittperator.js
index 1aa736e..4abdc57 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.4.777</version>
+ <version>1.5.0</version>
<minVersion>2.3</minVersion>
<maxVersion>2.4</maxVersion>
<author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author>
@@ -1346,11 +1346,8 @@ let PLUGIN_INFO =
function onMsg(msg, raw) {
listeners.forEach(function(listener) liberator.trapErrors(function() listener(msg, raw)));
- if (msg.text) {
- history.unshift(msg);
- if (history.length > setting.historyLimit)
- history.splice(setting.historyLimit);
- }
+ if (msg.text)
+ Twittperator.onMessage(msg);
}
function clearPluginData() {
@@ -1559,6 +1556,11 @@ let PLUGIN_INFO =
io.getRuntimeDirectories("plugin/twittperator").forEach(loadPluginFromDir(true));
io.getRuntimeDirectories("twittperator").forEach(loadPluginFromDir(false));
}, // }}}
+ onMessage: function(msg) { // {{{
+ history.unshift(msg);
+ if (history.length > setting.historyLimit)
+ history.splice(setting.historyLimit);
+ }, // }}}
openLink: function(text) { // {{{
let m = text.match(/.*?(https?:\/\/\S+)/g);
if (!m)