From f55362ff074eee9687ec4618d53373644b0d2bfe Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 14 Aug 2012 15:18:14 -0500 Subject: [PATCH] websock.js: jslint comments, debug comments, copyright date --- include/websock.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/websock.js b/include/websock.js index ca17668..b57ca18 100644 --- a/include/websock.js +++ b/include/websock.js @@ -1,6 +1,6 @@ /* * Websock: high-performance binary WebSockets - * Copyright (C) 2011 Joel Martin + * Copyright (C) 2012 Joel Martin * Licensed under LGPL-3 (see LICENSE.txt) * * Websock is similar to the standard WebSocket object but Websock @@ -14,9 +14,17 @@ * read binary data off of the receive queue. */ +/*jslint browser: true, bitwise: false, plusplus: false */ +/*global Util, Base64 */ + // Load Flash WebSocket emulator if needed +// To force WebSocket emulator even when native WebSocket available +//window.WEB_SOCKET_FORCE_FLASH = true; +// To enable WebSocket emulator debug: +//window.WEB_SOCKET_DEBUG=1; + if (window.WebSocket && !window.WEB_SOCKET_FORCE_FLASH) { Websock_native = true; } else if (window.MozWebSocket && !window.WEB_SOCKET_FORCE_FLASH) { @@ -25,9 +33,6 @@ if (window.WebSocket && !window.WEB_SOCKET_FORCE_FLASH) { } else { /* no builtin WebSocket so load web_socket.js */ - // To enable debug: - // window.WEB_SOCKET_DEBUG=1; - Websock_native = false; (function () { function get_INCLUDE_URI() { @@ -38,11 +43,11 @@ if (window.WebSocket && !window.WEB_SOCKET_FORCE_FLASH) { var start = "