ec56cf17ee3ad7bc515d535df27df849d2957c4d
1 _kiwi
.view
.TextTheme
= _kiwi
.view
.Panel
.extend({
2 initialize: function(text_theme
) {
3 this.text_theme
= text_theme
;
5 styleText: function(string_id
, params
) {
8 style
= formatToIrcMsg(_kiwi
.global
.text_theme
.options
[string_id
]);
10 // Bring member info back to first level of params
12 for(key
in params
['%M']) {
13 params
[key
] = params
['%M'][key
];
17 // Do the magic. Use the shorthand syntax to produce output.
18 text
= style
.replace(/%([TJHNCR])/g, function(match
, key
) {
21 if (typeof params
[key
.toUpperCase()] !== 'undefined')
22 return params
[key
.toUpperCase()];