Commit be098285 authored by Joel Martin's avatar Joel Martin

Merge branch 'master' of github.com:kanaka/noVNC

parents c3c51ed3 142aa458
......@@ -10,6 +10,7 @@ is not limited to):
include/display.js
include/input.js
include/jsunzip.js
include/keysym.js
include/logo.js
include/rfb.js
include/ui.js
......
images/alt.png

339 Bytes

images/esc.png

385 Bytes

images/tab.png

387 Bytes

/*
* noVNC base CSS
* Copyright (C) 2012 Joel Martin
* Copyright (C) 2013 Samuel Mannehed for Cendio AB
* noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
*/
......@@ -51,7 +52,6 @@ html {
float:right;
}
#noVNC_view_drag_button {
display: none;
}
......@@ -62,34 +62,36 @@ html {
display: none;
}
#noVNC_extra_keys {
display: inline;
list-style-type: none;
padding: 0px;
margin: 0px;
position: relative;
}
.noVNC-buttons-left {
float: left;
padding-left:10px;
padding-top:4px;
z-index: 1;
position: relative;
}
.noVNC-buttons-right {
float:right;
right: 0px;
padding-right:10px;
padding-top:4px;
}
#noVNC_status_bar {
margin-top: 0px;
padding: 0px;
z-index: 2;
position: absolute;
}
#noVNC_status_bar div {
#noVNC_status {
font-size: 12px;
padding-top: 4px;
width:100%;
}
#noVNC_status {
height:20px;
height:32px;
text-align: center;
font-weight: bold;
color: #fff;
}
#noVNC_settings_menu {
margin: 3px;
text-align: left;
......@@ -104,22 +106,12 @@ html {
float:right;
}
.noVNC_status_normal {
background: #eee;
}
.noVNC_status_error {
background: #f44;
}
.noVNC_status_warn {
background: #ff4;
}
/* Do not set width/height for VNC_screen or VNC_canvas or incorrect
* scaling will occur. Canvas resizes to remote VNC settings */
#noVNC_screen_pad {
margin: 0px;
padding: 0px;
height: 44px;
height: 36px;
}
#noVNC_screen {
text-align: center;
......@@ -154,14 +146,14 @@ html {
/*Bubble contents divs*/
#noVNC_settings {
display:none;
margin-top:77px;
margin-top:73px;
right:20px;
position:fixed;
}
#noVNC_controls {
display:none;
margin-top:77px;
margin-top:73px;
right:12px;
position:fixed;
}
......@@ -173,7 +165,7 @@ html {
display:none;
position:fixed;
margin-top:77px;
margin-top:73px;
right:20px;
left:20px;
padding:15px;
......@@ -186,9 +178,30 @@ html {
border-radius:10px;
}
#noVNC_popup_status_panel {
display:none;
position: fixed;
z-index: 1;
margin:15px;
margin-top:60px;
padding:15px;
width:auto;
text-align:center;
font-weight:bold;
word-wrap:break-word;
color:#fff;
background:rgba(0,0,0,0.65);
-webkit-border-radius:10px;
-moz-border-radius:10px;
border-radius:10px;
}
#noVNC_clipboard {
display:none;
margin-top:77px;
margin-top:73px;
right:30px;
position:fixed;
}
......@@ -207,17 +220,11 @@ html {
z-index: -1;
}
.noVNC_status_warn {
background-color:yellow;
}
/*
* Advanced Styling
*/
/* Control bar */
#noVNC-control-bar {
position:fixed;
.noVNC_status_normal {
background: #b2bdcd; /* Old browsers */
background: -moz-linear-gradient(top, #b2bdcd 0%, #899cb3 49%, #7e93af 51%, #6e84a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b2bdcd), color-stop(49%,#899cb3), color-stop(51%,#7e93af), color-stop(100%,#6e84a3)); /* Chrome,Safari4+ */
......@@ -225,9 +232,32 @@ html {
background: -o-linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* IE10+ */
background: linear-gradient(top, #b2bdcd 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* W3C */
}
.noVNC_status_error {
background: #f04040; /* Old browsers */
background: -moz-linear-gradient(top, #f04040 0%, #899cb3 49%, #7e93af 51%, #6e84a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f04040), color-stop(49%,#899cb3), color-stop(51%,#7e93af), color-stop(100%,#6e84a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* IE10+ */
background: linear-gradient(top, #f04040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* W3C */
}
.noVNC_status_warn {
background: #f0f040; /* Old browsers */
background: -moz-linear-gradient(top, #f0f040 0%, #899cb3 49%, #7e93af 51%, #6e84a3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f0f040), color-stop(49%,#899cb3), color-stop(51%,#7e93af), color-stop(100%,#6e84a3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* IE10+ */
background: linear-gradient(top, #f0f040 0%,#899cb3 49%,#7e93af 51%,#6e84a3 100%); /* W3C */
}
/* Control bar */
#noVNC-control-bar {
position:fixed;
display:block;
height:44px;
height:36px;
left:0;
top:0;
width:100%;
......@@ -368,22 +398,85 @@ html {
font-size: 180px;
}
@media screen and (min-width: 481px) and (max-width: 640px) {
.noVNC_status_button {
font-size: 10px;
.noVNC-buttons-left {
padding-left: 10px;
}
.noVNC-buttons-right {
padding-right: 10px;
}
#noVNC_status {
z-index: 0;
position: absolute;
width: 100%;
margin-left: 0px;
}
#showExtraKeysButton { display: none; }
#toggleCtrlButton { display: inline; }
#toggleAltButton { display: inline; }
#sendTabButton { display: inline; }
#sendEscButton { display: inline; }
/* left-align the status text on lower resolutions */
@media screen and (max-width: 800px){
#noVNC_status {
z-index: 1;
position: relative;
width: auto;
float: left;
margin-left: 4px;
}
}
@media screen and (max-width: 640px){
#noVNC_clipboard_text {
width: 410px;
}
#noVNC_logo {
font-size: 150px;
}
}
@media screen and (min-width: 321px) and (max-width: 480px) {
.noVNC_status_button {
font-size: 10px;
}
.noVNC-buttons-left {
padding-left: 0px;
}
.noVNC-buttons-right {
padding-right: 0px;
}
/* collapse the extra keys on lower resolutions */
#showExtraKeysButton {
display: inline;
}
#toggleCtrlButton {
display: none;
position: absolute;
top: 30px;
left: 0px;
}
#toggleAltButton {
display: none;
position: absolute;
top: 65px;
left: 0px;
}
#sendTabButton {
display: none;
position: absolute;
top: 100px;
left: 0px;
}
#sendEscButton {
display: none;
position: absolute;
top: 135px;
left: 0px;
}
}
@media screen and (min-width: 321px) and (max-width: 480px) {
#noVNC_clipboard_text {
width: 250px;
}
......
/*
* noVNC black CSS
* Copyright (C) 2012 Joel Martin
* Copyright (C) 2013 Samuel Mannehed for Cendio AB
* noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
*/
......@@ -9,7 +10,7 @@
background-color:#000;
}
#noVNC-control-bar {
.noVNC_status_normal {
background: #4c4c4c; /* Old browsers */
background: -moz-linear-gradient(top, #4c4c4c 0%, #2c2c2c 50%, #000000 51%, #131313 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(100%,#131313)); /* Chrome,Safari4+ */
......@@ -18,6 +19,24 @@
background: -ms-linear-gradient(top, #4c4c4c 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* IE10+ */
background: linear-gradient(top, #4c4c4c 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* W3C */
}
.noVNC_status_error {
background: #f04040; /* Old browsers */
background: -moz-linear-gradient(top, #f04040 0%, #2c2c2c 50%, #000000 51%, #131313 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f04040), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(100%,#131313)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* IE10+ */
background: linear-gradient(top, #f04040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* W3C */
}
.noVNC_status_warn {
background: #f0f040; /* Old browsers */
background: -moz-linear-gradient(top, #f0f040 0%, #2c2c2c 50%, #000000 51%, #131313 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f0f040), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(100%,#131313)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* IE10+ */
background: linear-gradient(top, #f0f040 0%,#2c2c2c 50%,#000000 51%,#131313 100%); /* W3C */
}
.triangle-right {
border:2px solid #fff;
......
/*
* noVNC blue CSS
* Copyright (C) 2012 Joel Martin
* Copyright (C) 2013 Samuel Mannehed for Cendio AB
* noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
* This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
*/
#noVNC-control-bar {
.noVNC_status_normal {
background-color:#04073d;
background-image: -webkit-gradient(
linear,
......@@ -20,6 +21,36 @@
rgb(4,7,61) 50%
);
}
.noVNC_status_error {
background-color:#f04040;
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.54, rgb(240,64,64)),
color-stop(0.5, rgb(4,7,61))
);
background-image: -moz-linear-gradient(
center bottom,
rgb(4,7,61) 54%,
rgb(249,64,64) 50%
);
}
.noVNC_status_warn {
background-color:#f0f040;
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.54, rgb(240,240,64)),
color-stop(0.5, rgb(4,7,61))
);
background-image: -moz-linear-gradient(
center bottom,
rgb(4,7,61) 54%,
rgb(240,240,64) 50%
);
}
.triangle-right {
border:2px solid #fff;
......
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2012 Joel Martin
* Copyright (C) 2013 Samuel Mannehed for Cendio AB
* Licensed under MPL 2.0 or any later version (see LICENSE.txt)
*/
......@@ -489,6 +490,9 @@ var that = {}, // Public API methods
conf = {}, // Configuration attributes
mouseCaptured = false;
var doubleClickTimer = null,
lastTouchPos = null;
// Configuration attributes
Util.conf_defaults(conf, that, defaults, [
['target', 'ro', 'dom', document, 'DOM element that captures mouse input'],
......@@ -521,6 +525,10 @@ function releaseMouse() {
// Private functions
//
function resetDoubleClickTimer() {
doubleClickTimer = null;
}
function onMouseButton(e, down) {
var evt, pos, bmask;
if (! conf.focused) {
......@@ -528,8 +536,34 @@ function onMouseButton(e, down) {
}
evt = (e ? e : window.event);
pos = Util.getEventPosition(e, conf.target, conf.scale);
if (e.touches || e.changedTouches) {
// Touch device
// When two touches occur within 500 ms of each other and are
// closer than 20 pixels together a double click is triggered.
if (down == 1) {
if (doubleClickTimer == null) {
lastTouchPos = pos;
} else {
clearTimeout(doubleClickTimer);
// When the distance between the two touches is small enough
// force the position of the latter touch to the position of
// the first.
var xs = lastTouchPos.x - pos.x;
var ys = lastTouchPos.y - pos.y;
var d = Math.sqrt((xs * xs) + (ys * ys));
// The goal is to trigger on a certain physical width, the
// devicePixelRatio brings us a bit closer but is not optimal.
if (d < 20 * window.devicePixelRatio) {
pos = lastTouchPos;
}
}
doubleClickTimer = setTimeout(resetDoubleClickTimer, 500);
}
bmask = conf.touchButton;
// If bmask is set
} else if (evt.which) {
......@@ -543,7 +577,7 @@ function onMouseButton(e, down) {
}
//Util.Debug("mouse " + pos.x + "," + pos.y + " down: " + down +
// " bmask: " + bmask + "(evt.button: " + evt.button + ")");
if (bmask > 0 && conf.onMouseButton) {
if (conf.onMouseButton) {
Util.Debug("onMouseButton " + (down ? "down" : "up") +
", x: " + pos.x + ", y: " + pos.y + ", bmask: " + bmask);
conf.onMouseButton(pos.x, pos.y, down, bmask);
......@@ -611,9 +645,9 @@ function onMouseDisable(e) {
evt = (e ? e : window.event);
pos = Util.getEventPosition(e, conf.target, conf.scale);
/* Stop propagation if inside canvas area */
if ((pos.x >= 0) && (pos.y >= 0) &&
(pos.x < conf.target.offsetWidth) &&
(pos.y < conf.target.offsetHeight)) {
if ((pos.realx >= 0) && (pos.realy >= 0) &&
(pos.realx < conf.target.offsetWidth) &&
(pos.realy < conf.target.offsetHeight)) {
//Util.Debug("mouse event disabled");
Util.stopEvent(e);
return false;
......
This diff is collapsed.
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2012 Joel Martin
* Copyright (C) 2013 Samuel Mannehed for Cendio AB
* Licensed under MPL 2.0 (see LICENSE.txt)
*
* See README.md for usage and integration instructions.
......@@ -102,7 +103,6 @@ var that = {}, // Public API methods
fb_height = 0,
fb_name = "",
last_req_time = 0,
rre_chunk_sz = 100,
timing = {
......@@ -147,9 +147,6 @@ Util.conf_defaults(conf, that, defaults, [
['viewportDrag', 'rw', 'bool', false, 'Move the viewport on mouse drags'],
['check_rate', 'rw', 'int', 217, 'Timing (ms) of send/receive check'],
['fbu_req_rate', 'rw', 'int', 1413, 'Timing (ms) of frameBufferUpdate requests'],
// Callback functions
['onUpdateState', 'rw', 'func', function() { },
'onUpdateState(rfb, state, oldstate, statusMsg): RFB state update/change '],
......@@ -165,6 +162,8 @@ Util.conf_defaults(conf, that, defaults, [
'onFBUComplete(rfb, fbu): RFB FBU received and processed '],
['onFBResize', 'rw', 'func', function() { },
'onFBResize(rfb, width, height): frame buffer resized'],
['onDesktopName', 'rw', 'func', function() { },
'onDesktopName(rfb, name): desktop name received'],
// These callback names are deprecated
['updateState', 'rw', 'func', function() { },
......@@ -400,7 +399,7 @@ updateState = function(state, statusMsg) {
}
if (msgTimer) {
clearInterval(msgTimer);
clearTimeout(msgTimer);
msgTimer = null;
}
......@@ -441,13 +440,13 @@ updateState = function(state, statusMsg) {
if (connTimer && (rfb_state !== 'connect')) {
Util.Debug("Clearing connect timer");
clearInterval(connTimer);
clearTimeout(connTimer);
connTimer = null;
}
if (disconnTimer && (rfb_state !== 'disconnect')) {
Util.Debug("Clearing disconnect timer");
clearInterval(disconnTimer);
clearTimeout(disconnTimer);
disconnTimer = null;
}
......@@ -566,44 +565,18 @@ function genDES(password, challenge) {
return (new DES(passwd)).encrypt(challenge);
}
function flushClient() {
if (mouse_arr.length > 0) {
//send(mouse_arr.concat(fbUpdateRequests()));
ws.send(mouse_arr);
setTimeout(function() {
ws.send(fbUpdateRequests());
}, 50);
mouse_arr = [];
return true;
} else {
return false;
}
}
// overridable for testing
checkEvents = function() {
var now;
if (rfb_state === 'normal' && !viewportDragging) {
if (! flushClient()) {
now = new Date().getTime();
if (now > last_req_time + conf.fbu_req_rate) {
last_req_time = now;
ws.send(fbUpdateRequests());
}
}
if (rfb_state === 'normal' && !viewportDragging && mouse_arr.length > 0) {
ws.send(mouse_arr);
mouse_arr = [];
}
setTimeout(checkEvents, conf.check_rate);
};
keyPress = function(keysym, down) {
var arr;
if (conf.view_only) { return; } // View only, skip keyboard events
arr = keyEvent(keysym, down);
arr = arr.concat(fbUpdateRequests());
ws.send(arr);
ws.send(keyEvent(keysym, down));
};
mouseButton = function(x, y, down, bmask) {
......@@ -622,7 +595,6 @@ mouseButton = function(x, y, down, bmask) {
return;
} else {
viewportDragging = false;
ws.send(fbUpdateRequests()); // Force immediate redraw
}
}
......@@ -630,7 +602,8 @@ mouseButton = function(x, y, down, bmask) {
mouse_arr = mouse_arr.concat(
pointerEvent(display.absX(x), display.absY(y)) );
flushClient();
ws.send(mouse_arr);
mouse_arr = [];
};
mouseMove = function(x, y) {
......@@ -653,7 +626,9 @@ mouseMove = function(x, y) {
if (conf.view_only) { return; } // View only, skip mouse events
mouse_arr = mouse_arr.concat(
pointerEvent(display.absX(x), display.absY(y)) );
pointerEvent(display.absX(x), display.absY(y)));
checkEvents();
};
......@@ -873,6 +848,7 @@ init_msg = function() {
/* Connection name/title */
name_length = ws.rQshift32();
fb_name = ws.rQshiftStr(name_length);
conf.onDesktopName(that, fb_name);
if (conf.true_color && fb_name === "Intel(r) AMT KVM")
{
......@@ -896,13 +872,12 @@ init_msg = function() {
response = pixelFormat();
response = response.concat(clientEncodings());
response = response.concat(fbUpdateRequests());
response = response.concat(fbUpdateRequests()); // initial fbu-request
timing.fbu_rt_start = (new Date()).getTime();
timing.pixels = 0;
ws.send(response);
/* Start pushing/polling */
setTimeout(checkEvents, conf.check_rate);
checkEvents();
if (conf.encrypt) {
updateState('normal', "Connected (encrypted) to: " + fb_name);
......@@ -930,6 +905,10 @@ normal_msg = function() {
switch (msg_type) {
case 0: // FramebufferUpdate
ret = framebufferUpdate(); // false means need more data
if (ret) {
// only allow one outstanding fbu-request at a time
ws.send(fbUpdateRequests());
}
break;
case 1: // SetColourMapEntries
Util.Debug("SetColourMapEntries");
......@@ -1592,8 +1571,6 @@ encHandlers.DesktopSize = function set_desktopsize() {
conf.onFBResize(that, fb_width, fb_height);
display.resize(fb_width, fb_height);
timing.fbu_rt_start = (new Date()).getTime();
// Send a new non-incremental request
ws.send(fbUpdateRequests());
FBU.bytes = 0;
FBU.rects -= 1;
......@@ -1819,7 +1796,6 @@ that.sendCtrlAltDel = function() {
arr = arr.concat(keyEvent(0xFFFF, 0)); // Delete
arr = arr.concat(keyEvent(0xFFE9, 0)); // Alt
arr = arr.concat(keyEvent(0xFFE3, 0)); // Control
arr = arr.concat(fbUpdateRequests());
ws.send(arr);
};
......@@ -1836,7 +1812,6 @@ that.sendKey = function(code, down) {
arr = arr.concat(keyEvent(code, 1));
arr = arr.concat(keyEvent(code, 0));
}
arr = arr.concat(fbUpdateRequests());
ws.send(arr);
};
......
This diff is collapsed.
......@@ -298,9 +298,11 @@ Util.getEventPosition = function (e, obj, scale) {
if (typeof scale === "undefined") {
scale = 1;
}
var x = Math.max(Math.min(docX - pos.x, obj.width-1), 0);
var y = Math.max(Math.min(docY - pos.y, obj.height-1), 0);
return {'x': x / scale, 'y': y / scale};
var realx = docX - pos.x;
var realy = docY - pos.y;
var x = Math.max(Math.min(realx, obj.width-1), 0);
var y = Math.max(Math.min(realy, obj.height-1), 0);
return {'x': x / scale, 'y': y / scale, 'realx': realx / scale, 'realy': realy / scale};
};
......
......@@ -5,6 +5,7 @@
<!--
noVNC example: simple example using default UI
Copyright (C) 2012 Joel Martin
Copyright (C) 2013 Samuel Mannehed for Cendio AB
noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
......@@ -65,12 +66,30 @@
<input type="image" src="images/keyboard.png"
id="showKeyboard" class="noVNC_status_button"
value="Keyboard" title="Show Keyboard"/>
<input type="email"
autocapitalize="off" autocorrect="off"
id="keyboardinput" class="noVNC_status_button"/>
<input type="text" autocapitalize="off" autocorrect="off"
id="keyboardinput" class=""/>
<div id="noVNC_extra_keys">
<input type="image" src="images/showextrakeys.png"
id="showExtraKeysButton"
class="noVNC_status_button">
<input type="image" src="images/ctrl.png"
id="toggleCtrlButton"
class="noVNC_status_button">
<input type="image" src="images/alt.png"
id="toggleAltButton"
class="noVNC_status_button">
<input type="image" src="images/tab.png"
id="sendTabButton"
class="noVNC_status_button">
<input type="image" src="images/esc.png"
id="sendEscButton"
class="noVNC_status_button">
</div>
</div>
</div>
<div id="noVNC_status">Loading</div>
<!--noVNC Buttons-->
<div class="noVNC-buttons-right">
<input type="image" src="images/ctrlaltdel.png"
......@@ -106,6 +125,10 @@
<input id="descriptionButton" type="button" value="Close">
</div>
<!-- Popup Status Panel -->
<div id="noVNC_popup_status_panel" class="">
</div>
<!-- Clipboard Panel -->
<div id="noVNC_clipboard" class="triangle-right top">
<textarea id="noVNC_clipboard_text" rows=5>
......@@ -163,10 +186,6 @@
<div id="noVNC_screen">
<div id="noVNC_screen_pad"></div>
<div id="noVNC_status_bar" class="noVNC_status_bar">
<div id="noVNC_status">Loading</div>
</div>
<h1 id="noVNC_logo"><span>no</span><br />VNC</h1>
<!-- HTML5 Canvas -->
......
......@@ -2,9 +2,10 @@
<html>
<head>
<!--
<!--
noVNC example: simple example using default UI
Copyright (C) 2012 Joel Martin
Copyright (C) 2013 Samuel Mannehed for Cendio AB
noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
......@@ -46,7 +47,9 @@
<div id="noVNC_screen">
<div id="noVNC_status_bar" class="noVNC_status_bar" style="margin-top: 0px;">
<table border=0 width="100%"><tr>
<td><div id="noVNC_status">Loading</div></td>
<td><div id="noVNC_status" style="position: relative; height: auto;">
Loading
</div></td>
<td width="1%"><div id="noVNC_buttons">
<input type=button value="Send CtrlAltDel"
id="sendCtrlAltDelButton">
......@@ -125,12 +128,12 @@
// if port == 80 (or 443) then it won't be present and should be
// set manually
if (!port) {
if (window.location.protocol.substring(0,4) == 'http') {
port = 80;
}
else if (window.location.protocol.substring(0,5) == 'https') {
if (window.location.protocol.substring(0,5) == 'https') {
port = 443;
}
else if (window.location.protocol.substring(0,4) == 'http') {
port = 80;
}
}
// If a token variable is passed in, set the parameter in a cookie.
......
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