From 13c638178aecf1ece7cfd5dfb669fdcd7fa8095b Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Thu, 9 Sep 2010 14:05:06 -0700 Subject: [PATCH] Leverage node.js serving of the client side files Make sure we can load io.js from node (window check) --- lib/io.js | 4 +++- socket.io.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/io.js b/lib/io.js index febf03b3..3e9d9a45 100644 --- a/lib/io.js +++ b/lib/io.js @@ -20,4 +20,6 @@ this.io = { } }; -if ('jQuery' in this) jQuery.io = this.io; \ No newline at end of file +if ('jQuery' in this) jQuery.io = this.io; + +if (typeof window != 'undefined') this.io.setPath('/socket.io/'); \ No newline at end of file diff --git a/socket.io.js b/socket.io.js index 3762b0ff..c1c4cc70 100644 --- a/socket.io.js +++ b/socket.io.js @@ -22,6 +22,8 @@ this.io = { }; if ('jQuery' in this) jQuery.io = this.io; + +if (typeof window != 'undefined') this.io.setPath('/socket.io/'); /** * Socket.IO client *