mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
refactoring
This commit is contained in:
parent
ff2ac423b2
commit
c5544349d2
@ -9,6 +9,7 @@ globals:
|
||||
Ui: true
|
||||
ui: true
|
||||
tools: true
|
||||
check_browser: true
|
||||
"$": true
|
||||
"$$": true
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Pi-KVM</title>
|
||||
<title>Pi-KVM / Session</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
@ -27,6 +27,7 @@
|
||||
<link rel="stylesheet" href="css/kvm/keyboard.css">
|
||||
<link rel="stylesheet" href="css/kvm/about.css">
|
||||
|
||||
<script src="js/bb.js"></script>
|
||||
<script src="js/tools.js"></script>
|
||||
<script src="js/ui.js"></script>
|
||||
<script src="js/kvm/stream.js"></script>
|
||||
|
||||
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")));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user