Disable VNC password, fix bug when running inside Kasm VDI

This commit is contained in:
matt
2020-10-29 19:24:59 +00:00
parent 531705c05c
commit 28d19cd556
2 changed files with 15 additions and 14 deletions

View File

@@ -71,9 +71,19 @@
loader.src = "vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
document.head.appendChild(loader);
});
window.addEventListener("load", function() {
document.getElementById("noVNC_connect_button").click();
});
let isInsideKasmVDI = false;
try {
isInsideKasmVDI = (window.self !== window.top);
} catch (e) {
isInsideKasmVDI = true;
}
if (!isInsideKasmVDI) {
window.addEventListener("load", function() {
document.getElementById("noVNC_connect_button").click();
});
}
</script>
<!-- actual script modules -->
<script type="module" crossorigin='use-credentials' src="app/ui.js"></script>