feat: add auto-load media content setting option

This commit is contained in:
codytseng
2025-09-13 23:05:21 +08:00
parent 6d7ecfe2fd
commit f785d0d8a2
35 changed files with 458 additions and 105 deletions

View File

@@ -61,6 +61,11 @@ export function isPartiallyInViewport(el: HTMLElement) {
)
}
export function isSupportCheckConnectionType() {
if (typeof window === 'undefined' || !(navigator as any).connection) return false
return typeof (navigator as any).connection.type === 'string'
}
export function isEmail(email: string) {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)
}