1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

novnc ES6 compatibility is not working. I reverse it. Spice/VNC sending ctrl+alt+fn functionality restored.

This commit is contained in:
catborise 2018-08-27 15:30:50 +03:00
parent f73271e677
commit 76e6388ec5
53 changed files with 19018 additions and 17438 deletions

View file

@ -1,43 +1,28 @@
'use strict';
/*
* noVNC: HTML5 VNC client
* Copyright (C) 2012 Joel Martin
* Licensed under MPL 2.0 (see LICENSE.txt)
*
* See README.md for usage and integration instructions.
*/
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isTouchDevice = undefined;
exports.supportsCursorURIs = supportsCursorURIs;
exports.isMac = isMac;
exports.isIE = isIE;
exports.isEdge = isEdge;
exports.isWindows = isWindows;
exports.isIOS = isIOS;
var _logging = require('./logging.js');
var Log = _interopRequireWildcard(_logging);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
import * as Log from './logging.js';
// Touch detection
var isTouchDevice = exports.isTouchDevice = 'ontouchstart' in document.documentElement ||
// requried for Chrome debugger
document.ontouchstart !== undefined ||
// required for MS Surface
navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; /*
* noVNC: HTML5 VNC client
* Copyright (C) 2012 Joel Martin
* Licensed under MPL 2.0 (see LICENSE.txt)
*
* See README.md for usage and integration instructions.
*/
export var isTouchDevice = ('ontouchstart' in document.documentElement) ||
// requried for Chrome debugger
(document.ontouchstart !== undefined) ||
// required for MS Surface
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0);
window.addEventListener('touchstart', function onFirstTouch() {
exports.isTouchDevice = isTouchDevice = true;
isTouchDevice = true;
window.removeEventListener('touchstart', onFirstTouch, false);
}, false);
var _cursor_uris_supported = null;
function supportsCursorURIs() {
export function supportsCursorURIs () {
if (_cursor_uris_supported === null) {
try {
var target = document.createElement('canvas');
@ -59,22 +44,26 @@ function supportsCursorURIs() {
return _cursor_uris_supported;
};
function isMac() {
return navigator && !!/mac/i.exec(navigator.platform);
export function isMac() {
return navigator && !!(/mac/i).exec(navigator.platform);
}
function isIE() {
return navigator && !!/trident/i.exec(navigator.userAgent);
export function isIE() {
return navigator && !!(/trident/i).exec(navigator.userAgent);
}
function isEdge() {
return navigator && !!/edge/i.exec(navigator.userAgent);
export function isEdge() {
return navigator && !!(/edge/i).exec(navigator.userAgent);
}
function isWindows() {
return navigator && !!/win/i.exec(navigator.platform);
export function isWindows() {
return navigator && !!(/win/i).exec(navigator.platform);
}
export function isIOS() {
return navigator &&
(!!(/ipad/i).exec(navigator.platform) ||
!!(/iphone/i).exec(navigator.platform) ||
!!(/ipod/i).exec(navigator.platform));
}
function isIOS() {
return navigator && (!!/ipad/i.exec(navigator.platform) || !!/iphone/i.exec(navigator.platform) || !!/ipod/i.exec(navigator.platform));
}