]> jfr.im git - irc/quakenet/qwebirc.git/blob - js/ui/hilightcontroller.js
Fix UI type hierarchy regression.
[irc/quakenet/qwebirc.git] / js / ui / hilightcontroller.js
1 qwebirc.ui.HilightController = new Class({
2 initialize: function(parent) {
3 this.parent = parent;
4 this.regex = null;
5 this.prevnick = null;
6 },
7 match: function(text) {
8 var nick = this.parent.nickname;
9 if(nick != this.prevnick)
10 this.regex = new RegExp('\\b' + RegExp.escape(nick) + '\\b', "i");
11
12 if(text.match(this.regex))
13 return true;
14 return false;
15 }
16 });