3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8"/>
5 <title> KiwiIRC
</title>
7 <link rel=
"stylesheet" type=
"text/css" href=
"style.css" />
13 <ul class=
"panellist channels"></ul>
21 <div class=
"panel_container container1"></div>
24 <div id=
"memberlists"></div>
28 <span class=
"nick"> </span>
29 <div class=
"input_wrap"><input type=
"text" class=
"inp" /></div>
34 <script type=
"text/x-jquery-tmpl" id=
"tmpl_userbox">
36 <a class=
"query">Message
</a>
37 <a class=
"info">Info
</a>
41 <script type=
"text/x-jquery-tmpl" id=
"tmpl_server_select">
42 <div class=
"server_select">
43 <div class=
"status"></div>
47 <label for=
"server_select_nick">Nickname
</label>
48 <input type=
"text" class=
"nick" id=
"server_select_nick"> <br />
50 <button type=
"submit">Connect..
</button> <br />
51 <a class=
"show_more">More
</a>
55 <label for=
"server_select_server">Server
</label>
56 <input type=
"text" class=
"server" id=
"server_select_server"> <br />
57 <label for=
"server_select_channel">Channel
</label>
58 <input type=
"text" class=
"channel" id=
"server_select_channel"> <br />
66 function getQueryVariable(variable) {
67 var query = window.location.search.substring(
1);
68 var vars = query.split('&');
69 for (var i =
0; i < vars.length; i++) {
70 var pair = vars[i].split('=');
71 if (decodeURIComponent(pair[
0]) == variable) {
72 return decodeURIComponent(pair[
1]);
77 window.onload = function () {
79 // Common dependancies that are required at all times
81 'jquery-
1.7.1.min.js',
84 'http://localhost:
7778/socket.io/socket.io.js',
87 // If in debug mode, load each development script
88 if (getQueryVariable('debug')) {
89 scripts = scripts.concat([
92 'dev/model_application.js',
93 'dev/model_gateway.js',
97 scripts.push('kiwi.min.js');
101 // Run after all dependancies have been loaded
102 function startApp () {
103 // Only debug if set in the querystring
104 if (!getQueryVariable('debug')) {
109 kiwi.app = new kiwi.model.Application({container: $('#kiwi')});
116 function loadNextScript () {
117 if (cur_script === scripts.length) {
122 var el = document.createElement('script');
123 el.onload = loadNextScript;
124 el.src = scripts[cur_script];
125 document.getElementsByTagName('head')[
0].appendChild(el);
130 // Start loading scripts