feat: ignore untrusted relay list and onion relays

This commit is contained in:
codytseng
2025-05-19 22:35:53 +08:00
parent 8d23c49908
commit c85892d6cd
3 changed files with 27 additions and 16 deletions

View File

@@ -18,6 +18,12 @@ export function isAndroid() {
return /android/i.test(ua)
}
export function isTorBrowser() {
if (typeof window === 'undefined' || !window.navigator) return false
const ua = window.navigator.userAgent
return /torbrowser/i.test(ua)
}
export function isInViewport(el: HTMLElement) {
const rect = el.getBoundingClientRect()
return (