aboutsummaryrefslogtreecommitdiffstats
path: root/notifier
diff options
context:
space:
mode:
authorteramako2009-01-03 08:11:55 +0000
committerteramako2009-01-03 08:11:55 +0000
commit1cb3e00c80a10947c821f47e162280c75295efcf (patch)
tree5e1ca3ec1533c97c5f5fb9132c33a4ae05819161 /notifier
parent882354c8d5c3de1e79391e3deb9d182c9600e135 (diff)
downloadvimperator-plugins-1cb3e00c80a10947c821f47e162280c75295efcf.tar.bz2
* fix:typo
* sticky_keyword有効化(コード恰好悪し修正求む) git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27826 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'notifier')
-rw-r--r--notifier/observer_growl.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/notifier/observer_growl.js b/notifier/observer_growl.js
index abcf760..8142122 100644
--- a/notifier/observer_growl.js
+++ b/notifier/observer_growl.js
@@ -65,7 +65,7 @@ Growl.prototype = {
this.defaults = {
life: 10,
sticky: false,
- suticky_keyword: [],
+ sticky_keyword: [],
hide: false
};
this.node = node;
@@ -164,8 +164,13 @@ notifier.observer.register(notifier.Observer, {
let item = container.childNodes[i];
let growl = item.__data__;
if (force ||
- (growl && !growl.options.sticky && growl.created &&
- growl.created.getTime() + (growl.options.life * 1000) < (new Date()).getTime())) {
+ (growl &&
+ !(growl.options.sticky ||
+ growl.options.sticky_keyword.some(function(keyword) this.indexOf(keyword) > -1, item.childNodes[2].textContent)) &&
+ growl.created &&
+ growl.created.getTime() + (growl.options.life * 1000) < (new Date()).getTime()
+ )
+ ) {
if (item.id != 'observer_growl_closer')
removeNodes.push(item);
}