From da36143e96ca2f1cd222f7fff059c64ce208c7ef Mon Sep 17 00:00:00 2001 From: anekos Date: Sat, 18 Sep 2010 01:15:21 +0000 Subject: Twittperator.onMessage を追加 補完用にユーザがダミーの履歴を突っ込めるようにするため。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38482 d0d07461-0603-4401-acd4-de1884942a52 --- twittperator.js | 14 ++++++++------ 1 file 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 = Twittperator Twitter Client using ChirpStream OAuth対応Twitterクライアント - 1.4.777 + 1.5.0 2.3 2.4 teramako @@ -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) -- cgit v1.2.3