settings: undefined, // Instance of _kiwi.model.DataStore\r
plugins: undefined, // Instance of _kiwi.model.PluginManager\r
events: undefined, // Instance of PluginInterface\r
- utils: {}, // TODO: Re-usable methods\r
+ utils: {}, // References to misc. re-usable helpers / functions\r
+\r
+ initUtils: function() {\r
+ this.utils.randomString = randomString;\r
+ this.utils.secondsToTime = secondsToTime;\r
+ this.utils.parseISO8601 = parseISO8601;\r
+ this.utils.escapeRegex = escapeRegex;\r
+ this.utils.formatIRCMsg = formatIRCMsg;\r
+ this.utils.styleText = styleText;\r
+ this.utils.hsl2rgb = hsl2rgb;\r
+ },\r
+\r
rpc: function() {\r
_kiwi.gateway.rpc.call.call(_kiwi.gateway.rpc, arguments);\r
},\r
var jobs, locale, localeLoaded, textThemeLoaded, text_theme;\r
opts = opts || {};\r
\r
+ this.initUtils();\r
+\r
jobs = new JobManager();\r
jobs.onFinish(function(locale, s, xhr) {\r
_kiwi.app = new _kiwi.model.Application(opts);\r