all.js content-type, keyboard events on login screen, favicon
authorDarren <darren@darrenwhitlen.com>
Sun, 18 Sep 2011 12:41:38 +0000 (13:41 +0100)
committerDarren <darren@darrenwhitlen.com>
Sun, 18 Sep 2011 12:41:38 +0000 (13:41 +0100)
img/ico.png [new file with mode: 0644]
node/app.js
node/client/index.html.jade

diff --git a/img/ico.png b/img/ico.png
new file mode 100644 (file)
index 0000000..82edbcb
Binary files /dev/null and b/img/ico.png differ
index 3129061003f2c7e20b25505a19194b45e378d383..633de3903b3aa8e40d6aca9186ea86c3842e11eb 100644 (file)
@@ -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;
index 2c66c67f12d3021aa23efb837218634f75fd43f9..6cf87fd7ea4ece6ccd773605e801110aafc9ee3f 100644 (file)
@@ -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);
             }