feat: 验证 IE, 并引导使用其它浏览器 (#215)

Co-authored-by: pany <939630029@qq.com>
This commit is contained in:
淳冉 2024-11-04 17:25:02 +08:00 committed by GitHub
parent 0bcb7886d5
commit 8523ec6695
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,13 @@
<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>