diff --git a/TODO b/TODO index 5fa596f5..61105c3c 100644 --- a/TODO +++ b/TODO @@ -3,9 +3,23 @@ - Get working in firefox using flash web-socket-js: http://github.com/gimite/web-socket-js + - Only load Flash stuff if needed: + var x='< script type="text/javascript" src='; + var y='><\/script>'; + var t=''; + t+= x+'file1.js'+y; + t+= x+'file2.js'+y; + t+= x+'fileA.txt'+y; + document.write(t); + - Version without mootools: - test cross-browser - Add WSS/https/SSL support to page and wsproxy.py - Make C version of wsproxy.py + +- Implement UI option for shared. + +- Upgrade to protocol 3.8 + - implement ZRLE encoding diff --git a/vnc.js b/vnc.js index 8ff25083..a92fa1b0 100644 --- a/vnc.js +++ b/vnc.js @@ -34,7 +34,8 @@ Array.prototype.shiftStr = function (len) { return String.fromCharCode(num); } ).join(''); } Array.prototype.pushStr = function (str) { - for (var i=0; i < str.length; i++) { + var n = str.length; + for (var i=0; i < n; i++) { this.push(str.charCodeAt(i)); } } @@ -377,8 +378,7 @@ display_raw: function () { display_copy_rect: function () { //console.log(">> display_copy_rect"); - FBU.bytes = 4; - if (RFB.d.length < FBU.bytes) { + if (RFB.d.length < 4) { //console.log(" waiting for " + (FBU.bytes - RFB.d.length) + " COPY-RECT bytes"); return; } @@ -392,9 +392,9 @@ display_copy_rect: function () { display_rre: function () { //console.log(">> display_rre (" + RFB.d.length + " bytes)"); if (FBU.subrects == 0) { - FBU.bytes = 4 + RFB.fb_Bpp; - if (RFB.d.length < FBU.bytes) { - //console.log(" waiting for " + (FBU.bytes - RFB.d.length) + " RRE bytes"); + ; + if (RFB.d.length < 4 + RFB.fb_Bpp) { + //console.log(" waiting for " + (4 + RFB.fb_Bpp - RFB.d.length) + " RRE bytes"); return; } FBU.subrects = RFB.d.shift32();