mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-14 03:56:36 +00:00
add back Android user agent check
This commit is contained in:
parent
c92ee08367
commit
b323ea21c9
1 changed files with 2 additions and 1 deletions
|
|
@ -39,10 +39,11 @@ export const DownloadsTable: FC<Props> = ({
|
||||||
|
|
||||||
const getDefaultIndex = useMemo<number>(() => {
|
const getDefaultIndex = useMemo<number>(() => {
|
||||||
const OS: string = typeof window !== 'undefined' ? window.navigator.platform : '';
|
const OS: string = typeof window !== 'undefined' ? window.navigator.platform : '';
|
||||||
|
const userAgent = typeof window !== 'undefined' ? window.navigator.userAgent : '';
|
||||||
if (/Mac/i.test(OS)) return 1;
|
if (/Mac/i.test(OS)) return 1;
|
||||||
if (/Win/i.test(OS)) return 2;
|
if (/Win/i.test(OS)) return 2;
|
||||||
if (/iPhone/i.test(OS)) return 3;
|
if (/iPhone/i.test(OS)) return 3;
|
||||||
if (/Android/i.test(OS)) return 4;
|
if (/Android/i.test(userAgent)) return 4;
|
||||||
return 0;
|
return 0;
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue