summaryrefslogtreecommitdiff
path: root/web/js/kvm/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/kvm/main.js')
-rw-r--r--web/js/kvm/main.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/web/js/kvm/main.js b/web/js/kvm/main.js
new file mode 100644
index 00000000..3cb65402
--- /dev/null
+++ b/web/js/kvm/main.js
@@ -0,0 +1,23 @@
+var ui;
+
+function main() {
+ if (
+ !window.navigator
+ || window.navigator.userAgent.indexOf("MSIE ") > 0
+ || window.navigator.userAgent.indexOf("Trident/") > 0
+ || window.navigator.userAgent.indexOf("Edge/") > 0
+ ) {
+ $("bad-browser-modal").style.visibility = "visible";
+ } else {
+ ui = new Ui();
+
+ tools.setOnClick($("show-about-button"), () => ui.showWindow($("about-window")));
+ tools.setOnClick($("show-keyboard-button"), () => ui.showWindow($("keyboard-window")));
+ tools.setOnClick($("show-stream-button"), () => ui.showWindow($("stream-window")));
+ tools.setOnClick($("open-log-button"), () => ui.open("kvmd/log?seek=3600&follow=1", "_blank"));
+
+ ui.showWindow($("stream-window"));
+
+ new Session();
+ }
+}