refactor: extract detect-ie.js
This commit is contained in:
parent
8523ec6695
commit
bc0c8f4cc4
@ -6,18 +6,12 @@
|
|||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/app-loading.css" />
|
<link rel="stylesheet" href="/app-loading.css" />
|
||||||
<title>%VITE_APP_TITLE%</title>
|
<title>%VITE_APP_TITLE%</title>
|
||||||
|
<script src="/detect-ie.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div id="app-loading"></div>
|
<div id="app-loading"></div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
|
||||||
// Tip: Simple judgments may not fully cover
|
|
||||||
if (/MSIE\s|Trident\//.test(window.navigator.userAgent)) {
|
|
||||||
document.body.innerHTML =
|
|
||||||
"<strong>Sorry, this browser is currently not supported. We recommend using the latest version of a modern browser. For example, Chrome/Firefox/Edge.</strong>"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
5
public/detect-ie.js
Normal file
5
public/detect-ie.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// Tip: Simple judgments may not fully cover
|
||||||
|
if (/MSIE\s|Trident\//.test(window.navigator.userAgent)) {
|
||||||
|
document.body.innerHTML =
|
||||||
|
"<strong>Sorry, this browser is currently not supported. We recommend using the latest version of a modern browser. For example, Chrome/Firefox/Edge.</strong>"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user