generated from ztimson/template
ztimson-patch-2 #2
46
public/index.html
Normal file
46
public/index.html
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<!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>
|
||||||
Reference in New Issue
Block a user