Skip to content

Commit

Permalink
Merge pull request #27 from brunobg/patch-2
Browse files Browse the repository at this point in the history
Better test for websocket support
  • Loading branch information
obastemur committed Sep 1, 2015
2 parents acb2154 + e40f222 commit 68d6421
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/jx_browser_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
jxcore.ieVersion=0;
jxcore.isIE = /MSIE/i.test(_ua);
jxcore.isAndroid = /Android/i.test(_ua);
jxcore.hasWebsocket = ('WebSocket' in window || 'MozWebSocket' in window);
jxcore.isIOS = /Mobile/i.test(_ua) && /Apple/i.test(_ua);
jxcore.isOpera = /Opera/i.test(_ua);
jxcore.isChrome = /Chrome/i.test(_ua);
Expand Down Expand Up @@ -577,7 +578,7 @@
return false;
}

if(jxcore.SocketURL==null || jxcore.isAndroid || (jxcore.isIE && jxcore.ieVersion<9)) {
if(jxcore.SocketURL==null || !jxcore.hasWebsocket || (jxcore.isIE && jxcore.ieVersion<9)) {
jxcore.SocketDisabled = true;
return false;
}
Expand Down

0 comments on commit 68d6421

Please sign in to comment.