refactor: move user agent checks to separate file

This commit is contained in:
Andrew Bastin
2021-12-17 15:10:06 +05:30
parent 2f50cff404
commit 655e6dc2a4
2 changed files with 7 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
export const browserIsChrome = () =>
/Chrome/i.test(navigator.userAgent) && /Google/i.test(navigator.vendor)
export const browserIsFirefox = () => /Firefox/i.test(navigator.userAgent)