Skip to content

Commit

Permalink
Update demo.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-Huang1 authored Jan 3, 2025
1 parent 41a48d0 commit 3bc1b3b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,11 @@
state(18, 8)

function isOldBrowser() {
// 检测一些浏览器支持的现代功能
const isModernBrowser = () => {
return 'fetch' in window && 'Promise' in window && 'assign' in Object && 'includes' in Array.prototype;
};

// 检查 User-Agent 字符串中是否包含一些已知的老旧浏览器标识

const userAgent = navigator.userAgent.toLowerCase();
const isOldBrowserByUA = /msie|trident|edge\/(1|12)/.test(userAgent);

Expand Down

0 comments on commit 3bc1b3b

Please sign in to comment.