From b9a63fa15c11470ab2a71b723fd45bd1d5448e34 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 29 Nov 2010 20:18:34 +0900 Subject: nyaaps --- sbmcommentsviewer.js | 4 ++-- twittperator.js | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/sbmcommentsviewer.js b/sbmcommentsviewer.js index d6dedd1..326d8bf 100644 --- a/sbmcommentsviewer.js +++ b/sbmcommentsviewer.js @@ -3,7 +3,7 @@ var PLUGIN_INFO = SBM Comments Viewer List show Social Bookmark Comments ソーシャル・ブックマーク・コメントを表示します - 0.2.0 + 0.2.1 2.0pre 3.0 http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/sbmcommentsviewer.js @@ -126,7 +126,7 @@ function SBMEntry(id, timestamp, comment, tags, extra){ //{{{ SBMEntry.prototype = { //{{{ toHTML: function(format){ function makeLink(str) - XMLList(str.replace(/(?:https?:\/\/|mailto:)\S+/g, '$&')); + XMLList(str.replace(/(?:https?:\/\/|mailto:)\S+/g, '$&')); var xml = ; var self = this; diff --git a/twittperator.js b/twittperator.js index d1511b8..2ea49b9 100644 --- a/twittperator.js +++ b/twittperator.js @@ -28,7 +28,7 @@ let PLUGIN_INFO = Twittperator Twitter Client using OAuth and Streaming API OAuth/StreamingAPI対応Twitterクライアント - 1.9.4 + 1.9.5 2.3 2.4 teramako @@ -1342,6 +1342,18 @@ let PLUGIN_INFO = let restartCount = 0; let lastParams; let listeners = []; + let retryTimer; + + function clearRetryTimer() { + if (retryTimer) + clearTimeout(retryTimer); + retryTimer = null; + } + + function updateRetryTimer(restartFunc) { + clearRetryTimer(); + retryTimer = setTimeout(restartFunc, 60 * 1000); + } function restart() { stop(); @@ -1354,6 +1366,7 @@ let PLUGIN_INFO = } function stop() { + clearRetryTimer(); if (!connection) return; connection.cancel(); @@ -1381,6 +1394,7 @@ let PLUGIN_INFO = let onReceive = function(data) { try { + updateRetryTimer(restart); let lines = data.split(/\r\n|[\r\n]/); if (lines.length >= 2) { lines[0] = buf + lines[0]; -- cgit v1.2.3