diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-02-28 15:56:04 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-02-28 15:56:04 +0100 |
| commit | 6711fb0c58e969284e3fcf94bb163c77445e2e13 (patch) | |
| tree | 9fe398601ca07919e546829d223b0f4be4649a11 /client/util | |
| parent | eaf8a163ed3dc15b624188dcf8ae7216b801d73e (diff) | |
footnote back and forth navigation
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 */ |
