Skip to content

Commit

Permalink
fix: added Mobile DuckDuckGo to ios group
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Sep 12, 2023
1 parent 3d92a5d commit 9673cb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/beacon-ui/src/utils/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ const isIpad = (win: Window): boolean => {
return false
}

export const isIOS = (win: Window): boolean => testUserAgent(win, /iPhone|iPod/i) || isIpad(win)
export const isPrivacyBrowser = (win: Window): boolean => testUserAgent(win, /Mobile DuckDuckGo/i)

export const isAndroid = (win: Window): boolean => testUserAgent(win, /android|sink/i)
export const isIOS = (win: Window): boolean => isPrivacyBrowser(win) || testUserAgent(win, /iPhone|iPod|Mobile DuckDuckGo/i) || isIpad(win)

export const isAndroid = (win: Window): boolean => !isPrivacyBrowser(win) && testUserAgent(win, /android|sink/i)

export const isTwBrowser = (win: Window): boolean => win && (win as any).ethereum?.isTrust == true

Expand Down

0 comments on commit 9673cb9

Please sign in to comment.