webui-aria2/js
Danny Warren b025ef3355 fixed websocket fallback for browsers that don't support websocket
* repro: open webui-aria2 in any browser that doesn't have native websocket support in its javascript library (example: Opera 12.01, IE9), and none of the functionality in webui-aria2 will work due to javascript errors

* see: http://en.wikipedia.org/wiki/WebSocket#Browser_support (Note that Firefox has websocket support, but calls its object "MozWebSocket" instead of "WebSocket", so this issue applies there too)

* there were a few places in script.js that check for websocket support by doing something like "if(WebSocket)" to see if the WebSocket object exists

* javascript doesn't handle undefined variables that way, the interpreter will actually throw an "undefined variable" error and stop execution of the script

* this means that any browser that doesn't have websocket support can never reach the fallback json call code

* added a new variable "web_sock_support" that does a proper "undefined" check, and is set to "1" if the "WebSocket" object is available in the browser

* changed the websocket checks to use the "web_sock_support" variable
2012-09-04 16:30:55 -07:00
..
libs experimental but unstable graph support 2012-08-01 18:44:20 +08:00
aria2_settings.js small typos 2012-06-25 01:53:30 -07:00
base64.js small typos 2012-06-25 01:53:30 -07:00
plugins.js added initial cookie support 2012-07-02 01:16:10 -07:00
script.js fixed websocket fallback for browsers that don't support websocket 2012-09-04 16:30:55 -07:00