diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 18:51:27 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-29 18:51:27 +0200 |
| commit | fe8cef1b709f09f508f17d0d6d06f204dd44a8bb (patch) | |
| tree | 75c03c0734106dda0a4e5b407778b58ec758d029 /app/client/api/util.js | |
| parent | 7d71a0248a8746088142bb51ce4248c76f274f30 (diff) | |
pushing files to s3.. filelist color
Diffstat (limited to 'app/client/api/util.js')
| -rw-r--r-- | app/client/api/util.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/client/api/util.js b/app/client/api/util.js new file mode 100644 index 0000000..99d63b4 --- /dev/null +++ b/app/client/api/util.js @@ -0,0 +1,11 @@ +export const is_iphone = !!((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) +export const is_ipad = !!(navigator.userAgent.match(/iPad/i)) +export const is_android = !!(navigator.userAgent.match(/Android/i)) +export const is_mobile = is_iphone || is_ipad || is_android +export const is_desktop = ! is_mobile; + +const htmlClassList = document.body.parentNode.classList +htmlClassList.add(is_desktop ? 'desktop' : 'mobile') +htmlClassList.remove('loading') + +// window.debug = false |
