From ec598c5bbc692fc473fbed411d05b07d137b8e14 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 22 Jun 2017 01:31:18 +0200 Subject: more css :) --- client/util.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client/util.js') diff --git a/client/util.js b/client/util.js index 0fe17e9..6b1e274 100644 --- a/client/util.js +++ b/client/util.js @@ -6,5 +6,12 @@ const isDesktop = ! isMobile document.body.classList.add(isDesktop ? 'desktop' : 'mobile') -export default { isIphone, isIpad, isAndroid, isMobile, isDesktop } +function randint(n){ return (Math.random()*n)|0 } +function randrange(a,b){ return (Math.random()*(b-a)+a)|0 } +function choice(a){ return a[randint(a.length)] } + +export { + isIphone, isIpad, isAndroid, isMobile, isDesktop, + randint, randrange, choice, +} -- cgit v1.2.3-70-g09d2