From 0bafe8cf76279250e507f6ae1d76cf7f67b3ce7c Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 5 Aug 2010 13:03:43 +0000 Subject: 履歴の最大保持数を設定可能にした git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38180 d0d07461-0603-4401-acd4-de1884942a52 --- twittperator.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'twittperator.js') diff --git a/twittperator.js b/twittperator.js index 28193e4..c940891 100755 --- a/twittperator.js +++ b/twittperator.js @@ -1157,8 +1157,8 @@ if (msg.text) { history.unshift(msg); - if (history.length > 1000) - history.splice(1000); + if (history.length > setting.historyLimit) + history.splice(setting.historyLimit); } } @@ -1625,7 +1625,8 @@ function loadPlugins() { // {{{ let (gv = liberator.globalVariables) ({ useChirp: !!gv.twittperator_use_chirp, autoStatusUpdate: !!parseInt(gv.twittperator_auto_status_update || 0), - statusValidDuration: parseInt(gv.twitperator_status_valid_duration || 90) + statusValidDuration: parseInt(gv.twitperator_status_valid_duration || 90), + historyLimit: let (v = gv.twittperator_history_limit) (v === 0 ? 0 : (v || 1000)), }); let statusRefreshTimer; -- cgit v1.2.3