aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/isLowMemory.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/client/isLowMemory.ts')
-rw-r--r--webAO/client/isLowMemory.ts10
1 files changed, 10 insertions, 0 deletions
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);
+ }
+}