diff options
author | suVene | 2008-12-19 19:46:13 +0000 |
---|---|---|
committer | suVene | 2008-12-19 19:46:13 +0000 |
commit | 427654cd8aab97d3aebd0b20b8f5aa34e186c37e (patch) | |
tree | 43f726504695597f317aaa46266d2436d940122e /notifier | |
parent | cb9cfe0315982cf60c8332d5c15977b7b4bba161 (diff) | |
download | vimperator-plugins-427654cd8aab97d3aebd0b20b8f5aa34e186c37e.tar.bz2 |
* bugfix.(無駄なtimer)
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27111 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'notifier')
-rw-r--r-- | notifier/observer_growl.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/notifier/observer_growl.js b/notifier/observer_growl.js index 473800a..4fa3aed 100644 --- a/notifier/observer_growl.js +++ b/notifier/observer_growl.js @@ -5,7 +5,7 @@ var PLUGIN_INFO = <description>notification from the subjects is notified to you by the Growl style.</description> <description lang="ja">Growl風通知。</description> <author mail="suvene@zeromemory.info" homepage="http://zeromemory.sblo.jp/">suVene</author> - <version>0.1.2</version> + <version>0.1.3</version> <minVersion>2.0pre</minVersion> <maxVersion>2.0pre</maxVersion> <detail><![CDATA[ @@ -107,7 +107,7 @@ notifier.observer.register(notifier.Observer, { //container.appendChild(doc.importNode(notification, true)); container.appendChild(notification); - if (container.childNodes.length == 1) { + if (container.childNodes.length == 1 && !container.__interval__) { let interval = setInterval($U.bind(this, this.checkStatus), 1000); container.__interval__ = interval; } else if (container.childNodes.length >= 2) { @@ -162,8 +162,10 @@ notifier.observer.register(notifier.Observer, { } removeNodes.forEach(function(element) element.__data__.remove()); - if (force || container.childNodes.length == 0) + if (force || container.childNodes.length == 0) { clearInterval(container.__interval__); + container.__interval__ = 0; + } }, removeAll: function(a) { |