overflow-x:wrap;\r
border:none;\r
display: none;\r
+ height: 100%;\r
}\r
#kiwi .messages a {\r
text-decoration:none;\r
return;
}
- var del_html = '<img src="img/redcross.png" class="tab_part" />';
+ var del_html = '<img src="/img/redcross.png" class="tab_part" />';
this.tab.append(del_html);
$('.tab_part', this.tab).click(function () {
return;
}
- var del_html = '<img src="img/redcross.png" class="tab_part" />';
+ var del_html = '<img src="/img/redcross.png" class="tab_part" />';
this.tab.append(del_html);
$('.tab_part', this.tab).click(function () {
this.httpHandler = function (request, response) {
- var uri, subs, useragent, agent, server_set, server, nick, debug, touchscreen, hash,
+ var uri, uri_parts, subs, useragent, agent, server_set, server, nick, debug, touchscreen, hash,
min = {}, public_http_path;
if (kiwi.config.handle_http) {
uri = url.parse(request.url, true);
+ uri_parts = uri.pathname.split('/');
+
subs = uri.pathname.substr(0, 4);
if (uri.pathname === '/js/all.js') {
if (kiwi.cache.alljs === '') {
request.addListener('end', function () {
kiwi.fileServer.serve(request, response);
});
- } else if (uri.pathname === '/') {
+ } else if (uri.pathname === '/' || uri_parts[1] === 'client') {
useragent = (request.headers) ? request.headers['user-agent'] : '';
if (useragent.match(/android/i) !== -1) {
agent = 'android';
agent = 'normal';
touchscreen = false;
- if (uri.query) {
- server_set = ((typeof uri.query.server !== 'undefined') && (uri.query.server !== ''));
- server = uri.query.server || 'irc.anonnet.org';
- nick = uri.query.nick || '';
- debug = (uri.query.debug !== '');
+ if (uri_parts[1] !== 'client') {
+ if (uri.query) {
+ server_set = ((typeof uri.query.server !== 'undefined') && (uri.query.server !== ''));
+ server = uri.query.server || 'irc.anonnet.org';
+ nick = uri.query.nick || '';
+ debug = (uri.query.debug !== '');
+ } else {
+ server_set = false;
+ server = 'irc.anonnet.org';
+ nick = '';
+ }
} else {
- server_set = false;
- server = 'irc.anonnet.org';
- nick = '';
+ server_set = ((typeof uri_parts[2] !== 'undefined') && (uri_parts[2] !== ''));
+ server = server_set ? uri_parts[2] : 'irc.anonnet.org';
+ nick = uri.query.nick || '';
}
+
response.setHeader('X-Generated-By', 'KiwiIRC');
hash = crypto.createHash('md5').update(touchscreen ? 't' : 'f').update(debug ? 't' : 'f').update(server_set ? 't' : 'f').update(server).update(nick).update(agent).update(JSON.stringify(kiwi.config)).digest('base64');
if (kiwi.cache.html[hash]) {
}
websocket.sendServerLine('CAP LS');
websocket.sendServerLine('NICK ' + nick);
- websocket.sendServerLine('USER ' + nick.replace(/[^0-9a-zA-Z\-_.]/, '') + '_kiwi 0 0 :' + nick);
+ websocket.sendServerLine('USER kiwi_' + nick.replace(/[^0-9a-zA-Z\-_.]/, '') + ' 0 0 :' + nick);
if ((callback) && (typeof (callback) === 'function')) {
callback();
meta(name="viewport", content="width=device-width,user-scalable=no")
title Kiwi IRC
- link(rel="stylesheet", type="text/css", href="css/default.css")
- link(rel="stylesheet", type="text/css", href="css/ui.css")
+ link(rel="stylesheet", type="text/css", href="/css/default.css")
+ link(rel="stylesheet", type="text/css", href="/css/ui.css")
- if (touchscreen)
link(rel="stylesheet", type="text/css", href="css/touchscreen_tweaks.css")
script(type="text/javascript", src="/socket.io/socket.io.js")
script(type="text/javascript", src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js")
script(type="text/javascript", src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js")
- script(type="text/javascript", src="js/jquery.json-2.2.min.js")
- //script(type="text/javascript", src="js/util.js")
- //script(type="text/javascript", src="js/gateway.js")
- //script(type="text/javascript", src="js/front.js")
- //script(type="text/javascript", src="js/iscroll.js")
- script(type="text/javascript", src="js/all.js")
- //script(type="text/javascript", src="js/plugins.js")
+ script(type="text/javascript", src="/js/jquery.json-2.2.min.js")
+ //script(type="text/javascript", src="/js/util.js")
+ //script(type="text/javascript", src="/js/gateway.js")
+ //script(type="text/javascript", src="/js/front.js")
+ //script(type="text/javascript", src="/js/iscroll.js")
+ script(type="text/javascript", src="/js/all.js")
+ //script(type="text/javascript", src="/js/plugins.js")
- if (touchscreen)
- script(type="text/javascript", src="js/touchscreen_tweaks.js")
+ script(type="text/javascript", src="/js/touchscreen_tweaks.js")
- var proto
- if (config.listen_ssl)
script#tmpl_change_nick(type="text/x-jquery-tmpl")
| <div class="newnick box">
- | Your new nick:<br />
+ | Your new nickname:<br />
| <form class="form_newnick">
| <input type="text" class="txtnewnick" /><br />
| <button class="butnewnick" type="submit">Change</button> <a class="link cancelnewnick">Cancel</a>
script#tmpl_user_box(type="text/x-jquery-tmpl")
| <div class="userbox">
| <input type="hidden" class="userbox_nick" value="${nick}" />
- | <a href="#" class="userbox_query">Message</a>
- | <a href="#" class="userbox_whois">Info</a>
+ | <a class="userbox_query">Message</a>
+ | <a class="userbox_whois">Info</a>
| </div>
body
ul
div#windows.windows
- div.scroller(style="width:100%")
+ div.scroller(style="width:100%;height:100%;")
div.control
div.msginput