From 87b02777e23896af51a7469eae1d78d761bfb646 Mon Sep 17 00:00:00 2001 From: z0ccc Date: Sun, 29 Aug 2021 15:41:42 -0400 Subject: [PATCH] Fixed webgl error issue and added analytics --- frontend/public/index.html | 38 +++++++++++++-------------------- frontend/src/components/main.js | 8 ++++++- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/frontend/public/index.html b/frontend/public/index.html index 1ecbb54..4c641ef 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -1,6 +1,21 @@ + + + + @@ -9,34 +24,11 @@ name="description" content="Web site created using create-react-app" /> - - Vytal
- diff --git a/frontend/src/components/main.js b/frontend/src/components/main.js index 084e2ff..aecbd9d 100644 --- a/frontend/src/components/main.js +++ b/frontend/src/components/main.js @@ -172,7 +172,13 @@ const getBattery = async () => { const getWebGL = () => { const gl = document.createElement('canvas').getContext('webgl'); - const ext = gl.getExtension('WEBGL_debug_renderer_info'); + let ext; + if (gl) { + ext = gl.getExtension('WEBGL_debug_renderer_info'); + } else { + ext = null; + } + const data = [ { key: 'webGLVendor',