From 1e3f34e03c9dd8fda7e2b24e4533e23fcb7e1de7 Mon Sep 17 00:00:00 2001 From: Caleb Date: Fri, 9 Sep 2022 18:12:48 -0400 Subject: Moved more functions out of client --- webAO/client/isLowMemory.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 webAO/client/isLowMemory.ts (limited to 'webAO/client/isLowMemory.ts') diff --git a/webAO/client/isLowMemory.ts b/webAO/client/isLowMemory.ts new file mode 100644 index 0000000..caa6784 --- /dev/null +++ b/webAO/client/isLowMemory.ts @@ -0,0 +1,10 @@ +import { setOldLoading } from '../client' +export const isLowMemory = () => { + if ( + /webOS|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|PlayStation|Nintendo|Opera Mini/i.test( + navigator.userAgent + ) + ) { + setOldLoading(true); + } +} -- cgit