4 <title>slave tab pages which create hanging wss connection</title>
5 <script type="text/javascript">
6 var href = window.location.href;
7 var hostBegin = href.indexOf('/') + 2;
8 var hostEnd = href.lastIndexOf(':');
9 var host = href.slice(hostBegin, hostEnd);
10 var queryBegin = href.lastIndexOf('?') + 1;
11 var port = href.slice(queryBegin);
12 var url = 'wss://' + host + ':' + port;
15 ws = new WebSocket(url);