generated from ztimson/template
46 lines
1.2 KiB
HTML
46 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Remote Desktop</title>
|
|
<style>
|
|
html, body {
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
background: #000;
|
|
}
|
|
|
|
#screen {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="screen"></div>
|
|
|
|
<script type="module">
|
|
import RFB from '/novnc/core/rfb.js';
|
|
|
|
const screen = document.querySelector('#screen');
|
|
|
|
const rfb = new RFB(
|
|
screen,
|
|
`wss://${location.host}/websockify`
|
|
);
|
|
|
|
rfb.addEventListener('connect', () => console.log('RFB connected'));
|
|
rfb.addEventListener('disconnect', event => console.log('RFB disconnected', event.detail));
|
|
|
|
rfb.scaleViewport = true;
|
|
rfb.resizeSession = false;
|
|
rfb.showDotCursor = true;
|
|
|
|
rfb.addEventListener('connect', () => console.log('Connected'));
|
|
rfb.addEventListener('disconnect', event => console.log('Disconnected', event.detail));
|
|
</script>
|
|
</body>
|
|
</html> |