From 0981845ec45e3b6e36e51ea81162451aecb507e0 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sun, 30 Jan 2011 22:58:22 -0600 Subject: [PATCH] IE9 fixes. Works but slow. API change. API change: changed include path variable from VNC_uri_prefix to URI_INCLUDE since websock.js uses the variable and websock.js is no longer just for noVNC (i.e. websockify is really the canonical location for websock.js). Changes to get web-socket-js to work. Right now it's a hack to get around: https://github.com/gimite/web-socket-js/issues#issue/41. The hack is to disable caching of the flash objects by appending "?" + Math.random() to the end of the flash object path (but only when using IE). --- docs/TODO | 4 +++- include/ui.js | 2 +- include/vnc.js | 8 ++++---- include/websock.js | 6 +++++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/TODO b/docs/TODO index ec6216cf..bc6360ec 100644 --- a/docs/TODO +++ b/docs/TODO @@ -3,7 +3,9 @@ Short Term: - Keyboard layout/internationalization support - convert keyCode into proper charCode -- Test on IE 9 preview 3. +- IE 9 improvements. + - https://github.com/gimite/web-socket-js/issues#issue/41 + - try window.atob instead of decode for better performance - Status bar menu/buttons: - Explanatory hover text over buttons diff --git a/include/ui.js b/include/ui.js index 217b8b15..2229c67d 100644 --- a/include/ui.js +++ b/include/ui.js @@ -7,7 +7,7 @@ */ "use strict"; /*jslint white: false */ -/*global $, Util, RFB, Canvas, VNC_uri_prefix, Element, Fx */ +/*global $, Util, RFB, Canvas, Element, Fx */ var UI = { diff --git a/include/vnc.js b/include/vnc.js index bee737d8..e0642657 100644 --- a/include/vnc.js +++ b/include/vnc.js @@ -8,7 +8,7 @@ "use strict"; /*jslint evil: true */ -/*global window, document, VNC_uri_prefix */ +/*global window, document, INCLUDE_URI */ // Globals defined here var VNC_native_ws, WEB_SOCKET_SWF_LOCATION; @@ -16,14 +16,14 @@ var VNC_native_ws, WEB_SOCKET_SWF_LOCATION; /* * Load supporting scripts */ -function get_VNC_uri_prefix() { - return (typeof VNC_uri_prefix !== "undefined") ? VNC_uri_prefix : "include/"; +function get_INCLUDE_URI() { + return (typeof INCLUDE_URI !== "undefined") ? INCLUDE_URI : "include/"; } (function () { var extra = "", start, end; - start = "