From 9e6e587e50efa8edff91307f4b6ebaa4cd6233db Mon Sep 17 00:00:00 2001 From: suVene Date: Sun, 4 Jan 2009 00:53:27 +0000 Subject: - remove判定整理。 - sticky_keyword → sticky_keywords 変更。 - liberator.echomsg の filter 実装。 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@27851 d0d07461-0603-4401-acd4-de1884942a52 --- notifier/subject_liberator_echomsg.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'notifier/subject_liberator_echomsg.js') diff --git a/notifier/subject_liberator_echomsg.js b/notifier/subject_liberator_echomsg.js index c435474..5c963ef 100755 --- a/notifier/subject_liberator_echomsg.js +++ b/notifier/subject_liberator_echomsg.js @@ -11,11 +11,20 @@ var PLUGIN_INFO = liberator.echomsg notice. liberator.echomsg 通知。 suVene - 0.1.0 + 0.1.1 MIT 2.0pre 2.0pre http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/notifier/subject_liberator_echomsg.js + || +liberator.globalVariables.subject_liberator_echomsg_filter = [ + 'Auto commands for', + '^autocommand' +]; +||< + ]]> ; //}}} (function() { @@ -33,6 +42,7 @@ notifier.subject.register(notifier.Subject, { this.original = liberator.echomsg; this.__updating__ = false; this.messages = []; + this.filter = liberator.globalVariables.subject_liberator_echomsg_filter || []; var self = this; @@ -40,7 +50,6 @@ notifier.subject.register(notifier.Subject, { while (self.waiting) liberator.sleep(100); - logger.log('message: ' + message); self.messages.push(message); return self.original.apply(null, arguments); }; @@ -48,6 +57,7 @@ notifier.subject.register(notifier.Subject, { check: function() { try { this.__updating__ = true; + this.messages = this.messages.filter(function(m) !this.filter.some(function(f) (m.indexOf(f) > -1 || m.match(f))), this); if (!this.messages.length) return; var msg = ''; -- cgit v1.2.3