File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change
1
+ var url = require ( 'url' ) ;
1
2
var io = require ( "socket.io-client" ) ;
2
3
var stripAnsi = require ( 'strip-ansi' ) ;
3
4
var scriptElements = document . getElementsByTagName ( "script" ) ;
4
- io = io . connect ( typeof __resourceQuery === "string" && __resourceQuery ?
5
+
6
+ var urlParts = url . parse ( typeof __resourceQuery === "string" && __resourceQuery ?
5
7
__resourceQuery . substr ( 1 ) :
6
8
scriptElements [ scriptElements . length - 1 ] . getAttribute ( "src" ) . replace ( / \/ [ ^ \/ ] + $ / , "" )
7
9
) ;
8
10
11
+ io = io . connect (
12
+ url . format ( {
13
+ protocol : urlParts . protocol ,
14
+ auth : urlParts . auth ,
15
+ host : urlParts . host
16
+ } ) , {
17
+ path : urlParts . path === '/' ? null : urlParts . path
18
+ }
19
+ ) ;
20
+
9
21
var hot = false ;
10
22
var initial = true ;
11
23
var currentHash = "" ;
You can’t perform that action at this time.
0 commit comments