diff options
| author | adamhrv <adam@ahprojects.com> | 2019-02-28 18:50:22 +0100 |
|---|---|---|
| committer | adamhrv <adam@ahprojects.com> | 2019-02-28 18:50:22 +0100 |
| commit | 6c631c88c9ecc2683b95534cfd15e82650c1b501 (patch) | |
| tree | 786d993a57c8c4d6fba26cad5fbda056c346c418 /client/util | |
| parent | 9e3bb35630349847bc005389c408f3072e0e22db (diff) | |
| parent | e845766d970f4afefc2fc47367c3478413f98ff2 (diff) | |
Merge branch 'master' of github.com:adamhrv/megapixels_dev
Diffstat (limited to 'client/util')
| -rw-r--r-- | client/util/index.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/util/index.js b/client/util/index.js index d0db0d98..0792e24e 100644 --- a/client/util/index.js +++ b/client/util/index.js @@ -5,12 +5,16 @@ export const isiPad = !!(navigator.userAgent.match(/iPad/i)) export const isAndroid = !!(navigator.userAgent.match(/Android/i)) export const isMobile = isiPhone || isiPad || isAndroid export const isDesktop = !isMobile +export const isFirefox = typeof InstallTrigger !== 'undefined' export const toArray = a => Array.prototype.slice.apply(a) export const choice = a => a[Math.floor(Math.random() * a.length)] const htmlClassList = document.body.parentNode.classList htmlClassList.add(isDesktop ? 'desktop' : 'mobile') +if (isFirefox) { + htmlClassList.add('firefox') +} /* Default image dimensions */ |
