From bc0c8f4cc4c539654a296754640bbd0ab6171851 Mon Sep 17 00:00:00 2001 From: pany <939630029@qq.com> Date: Mon, 4 Nov 2024 17:37:43 +0800 Subject: [PATCH] refactor: extract detect-ie.js --- index.html | 8 +------- public/detect-ie.js | 5 +++++ 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 public/detect-ie.js diff --git a/index.html b/index.html index 8a4e2eb2..ac99fbd3 100644 --- a/index.html +++ b/index.html @@ -6,18 +6,12 @@ %VITE_APP_TITLE% +
- diff --git a/public/detect-ie.js b/public/detect-ie.js new file mode 100644 index 00000000..3568e83e --- /dev/null +++ b/public/detect-ie.js @@ -0,0 +1,5 @@ +// Tip: Simple judgments may not fully cover +if (/MSIE\s|Trident\//.test(window.navigator.userAgent)) { + document.body.innerHTML = + "Sorry, this browser is currently not supported. We recommend using the latest version of a modern browser. For example, Chrome/Firefox/Edge." +}