summaryrefslogtreecommitdiff
path: root/node_modules/socket.io/examples/irc-output/index.jade
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2012-09-24 16:22:07 -0400
committerJules Laplace <jules@okfoc.us>2012-09-24 16:22:07 -0400
commit686106d544ecc3b6ffd4db2b665d3bc879a58d8c (patch)
treea5b5e50237cef70e12f0745371896e96f5f6d578 /node_modules/socket.io/examples/irc-output/index.jade
ok
Diffstat (limited to 'node_modules/socket.io/examples/irc-output/index.jade')
-rw-r--r--node_modules/socket.io/examples/irc-output/index.jade28
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/socket.io/examples/irc-output/index.jade b/node_modules/socket.io/examples/irc-output/index.jade
new file mode 100644
index 0000000..5468632
--- /dev/null
+++ b/node_modules/socket.io/examples/irc-output/index.jade
@@ -0,0 +1,28 @@
+doctype 5
+html
+ head
+ link(href='/stylesheets/style.css', rel='stylesheet')
+ script(src='http://code.jquery.com/jquery-1.6.1.min.js')
+ script(src='/socket.io/socket.io.js')
+ script
+ var socket = io.connect();
+
+ socket.on('connect', function () {
+ $('#irc').addClass('connected');
+ });
+
+ socket.on('announcement', function (msg) {
+ $('#messages').append($('<p>').append($('<em>').text(msg)));
+ $('#messages').get(0).scrollTop = 10000000;
+ });
+
+ socket.on('irc message', function (user, msg) {
+ $('#messages').append($('<p>').append($('<b>').text(user), msg));
+ $('#messages').get(0).scrollTop = 10000000;
+ });
+ body
+ h2 Node.JS IRC
+ #irc
+ #connecting
+ .wrap Connecting to socket.io server
+ #messages