diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-31 23:15:32 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-31 23:15:32 +0200 |
| commit | dd31a7b9a3af167808b04ffe2af3a66af8b17c33 (patch) | |
| tree | d99bc1be5d382d330a844a1c7bcb7b3fb44eda3e /app/client/api | |
| parent | fe399143527972050534b3262c94dfbf291ddb41 (diff) | |
nice size functions from bucky :)
Diffstat (limited to 'app/client/api')
| -rw-r--r-- | app/client/api/index.js | 2 | ||||
| -rw-r--r-- | app/client/api/util.js | 15 |
2 files changed, 1 insertions, 16 deletions
diff --git a/app/client/api/index.js b/app/client/api/index.js index 2fcd434..c19b78d 100644 --- a/app/client/api/index.js +++ b/app/client/api/index.js @@ -1,5 +1,5 @@ import { crud_actions } from './crud.actions' -import * as util from './util' +import * as util from '../util' import * as parser from './parser' /* diff --git a/app/client/api/util.js b/app/client/api/util.js deleted file mode 100644 index 6500979..0000000 --- a/app/client/api/util.js +++ /dev/null @@ -1,15 +0,0 @@ -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 - -function randint(n) { return Math.floor(Math.random()*n) } - -document.body.style.backgroundImage = 'linear-gradient(' + (randint(40)+40) + 'deg, #fde, #ffe)' |
