summaryrefslogtreecommitdiff
path: root/web/js/kvm/main.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-11-14 02:52:00 +0300
committerDevaev Maxim <[email protected]>2018-11-14 02:57:47 +0300
commit2916c7fe067ee8093edfda62d2a0bd51b70e4090 (patch)
treef76bde4fadd84c5dd0a3121cc8f8d0f820d7bc15 /web/js/kvm/main.js
parent49a09a6ba168ada706999e9955b531b975edbd5f (diff)
refactoring
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();
+ }
+}