From: Darren Date: Sun, 18 Sep 2011 12:41:38 +0000 (+0100) Subject: all.js content-type, keyboard events on login screen, favicon X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=34872bd6259823d8738abfb7ec7f7922d3ba610e;p=KiwiIRC.git all.js content-type, keyboard events on login screen, favicon --- diff --git a/img/ico.png b/img/ico.png new file mode 100644 index 0000000..82edbcb Binary files /dev/null and b/img/ico.png differ diff --git a/node/app.js b/node/app.js index 3129061..633de39 100644 --- a/node/app.js +++ b/node/app.js @@ -538,6 +538,7 @@ this.httpHandler = function (request, response) { if (request.headers['if-none-match'] === kiwi.cache.alljs_hash) { response.statusCode = 304; } else { + response.setHeader('Content-type', 'application/javascript'); response.setHeader('ETag', kiwi.cache.alljs_hash); response.write(kiwi.cache.alljs); } @@ -586,7 +587,14 @@ this.httpHandler = function (request, response) { } 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'); + 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]) { if (request.headers['if-none-match'] === kiwi.cache.html[hash].hash) { response.statusCode = 304; diff --git a/node/client/index.html.jade b/node/client/index.html.jade index 2c66c67..6cf87fd 100644 --- a/node/client/index.html.jade +++ b/node/client/index.html.jade @@ -5,8 +5,9 @@ html(xmlns="http://www.w3.org/1999/xhtml", lang="en-gb") meta(http-equiv="Content-Type", content="text/html; charset=utf-8") - if ((agent === 'android') || (agent === 'iphone') || (agent === 'ipad') || (agent === 'ipod')) meta(name="viewport", content="width=device-width,user-scalable=no") - + title Kiwi IRC + link(rel="shortcut icon", href="/img/ico.png") link(rel="stylesheet", type="text/css", href="/css/default.css") link(rel="stylesheet", type="text/css", href="/css/ui.css") @@ -70,7 +71,8 @@ html(xmlns="http://www.w3.org/1999/xhtml", lang="en-gb") } $('.formconnectwindow .nick').keydown(input_submit); $('.formconnectwindow .channel').keydown(input_submit); - $('.formconnectwindow .server').keydown(input_submit); + $('.formconnectwindow .network').keydown(input_submit); + $('.formconnectwindow .port').keydown(input_submit); }