mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 09:01:54 +08:00
refactoring
This commit is contained in:
13
web/js/bb.js
Normal file
13
web/js/bb.js
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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")));
|
||||
|
||||
Reference in New Issue
Block a user