summaryrefslogtreecommitdiff
path: root/web/js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js')
-rw-r--r--web/js/bb.js13
-rw-r--r--web/js/kvm/main.js9
2 files changed, 14 insertions, 8 deletions
diff --git a/web/js/bb.js b/web/js/bb.js
new file mode 100644
index 00000000..8d8590db
--- /dev/null
+++ b/web/js/bb.js
@@ -0,0 +1,13 @@
+function check_browser() {
+ 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";
+ return false;
+ } else {
+ return true;
+ }
+}
diff --git a/web/js/kvm/main.js b/web/js/kvm/main.js
index 3cb65402..4565ce3c 100644
--- a/web/js/kvm/main.js
+++ b/web/js/kvm/main.js
@@ -1,14 +1,7 @@
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 {
+ if (check_browser()) {
ui = new Ui();
tools.setOnClick($("show-about-button"), () => ui.showWindow($("about-window")));