Commit e66f3f89 authored by Joel Martin's avatar Joel Martin

Add Chrome Frame support. Close requests in web.py.

- Add meta tag to vnc.html and vnc_auto.html so that if Chrome Frame
  is installed, it is used.

- Add detection to default_controls.js that shows a message with
  a Chrome Frame install link if the user is using a version of IE
  without Canvas support.

- Fix web.py so that requests have their connection closed after they
  are completed.  This has been a bug for a while but it prevents
  Chrome Frame from working because Chrome Frame doesn't activate
  until the initial request connection closes.
parent 1ee2d93e
......@@ -15,12 +15,26 @@ settingsOpen : false,
// Render default controls and initialize settings menu
load: function(target) {
var html, i, DC = DefaultControls, sheet, sheets, llevels;
var html = '', i, DC = DefaultControls, sheet, sheets, llevels;
/* Populate the 'target' DOM element with default controls */
if (!target) { target = 'vnc'; }
html = "";
if ((!document.createElement('canvas').getContext) &&
window.ActiveXObject) {
// Suggest Chrome frame for Internet Explorer users
html += '<center><div style="text-align: left; width: 400px">';
html += ' You are using a version of Internet Explorer ';
html += ' that does not have HTML5 Canvas support. ';
html += ' To use noVNC you must use a browser with HTML5 ';
html += ' Canvas support or install ';
html += ' <a href="http://google.com/chromeframe" target="cframe">';
html += ' Google Chrome Frame.</a>';
html += '</div></center>';
$(target).innerHTML = html;
return;
}
html += '<div id="VNC_controls">';
html += ' <ul>';
html += ' <li>Host: <input id="VNC_host"></li>';
......
......@@ -17,6 +17,7 @@ import SimpleHTTPServer as server # python 2.X
def do_request(connstream, from_addr):
x = object()
server.SimpleHTTPRequestHandler(connstream, from_addr, x)
connstream.close()
def serve():
bindsocket = socket.socket()
......
......@@ -5,7 +5,8 @@
Licensed under LGPL-3 (see LICENSE.txt)
-->
<head>
<title>VNC Client</title>
<title>noVNC</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="include/plain.css">
<link rel="alternate stylesheet" href="include/black.css" TITLE="Black">
<!--
......
......@@ -8,7 +8,8 @@
http://example.com/?host=HOST&port=PORT&encrypt=1&true_color=1
-->
<head>
<title>VNC Client</title>
<title>noVNC</title>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="include/plain.css" title="plain">
<!--
<script type='text/javascript'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment