diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-12-15 22:47:28 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-12-15 22:47:28 +0100 |
| commit | a53a598461a25e8bf1d0bd3e63c47642e3213aef (patch) | |
| tree | 25fd8abc3d5ad1bbef9eeb96d86e0170d6f55dc6 /client/util.js | |
| parent | f91c6d8e870bd3b2c69a130e4b1ed8f6be250b92 (diff) | |
client stuff
Diffstat (limited to 'client/util.js')
| -rw-r--r-- | client/util.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/util.js b/client/util.js index ad303c64..92b4addc 100644 --- a/client/util.js +++ b/client/util.js @@ -6,6 +6,8 @@ export const isAndroid = !!(navigator.userAgent.match(/Android/i)) export const isMobile = isiPhone || isiPad || isAndroid export const isDesktop = !isMobile +export const toArray = a => Array.prototype.slice.apply(a) + const htmlClassList = document.body.parentNode.classList htmlClassList.add(isDesktop ? 'desktop' : 'mobile') |
