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="stylesheet" href="/app-loading.css" />
|
||||
<title>%VITE_APP_TITLE%</title>
|
||||
<script src="/detect-ie.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div id="app-loading"></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>
|
||||
</body>
|
||||
</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