From 58633568069e68e8c2c739120581862e7d844f08 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 15 Sep 2022 20:15:03 -0400 Subject: [PATCH] remove menu on PWA --- MTG/script.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MTG/script.js b/MTG/script.js index a5bf366..e42106e 100644 --- a/MTG/script.js +++ b/MTG/script.js @@ -21,6 +21,18 @@ window.onload = function(){ } }; +function isInstalled() { + // For iOS + if(window.navigator.standalone) return true + document.getElementById("nav").style.display = "none" + + // For Android + if(window.matchMedia('(display-mode: standalone)').matches) return true +document.getElementById("nav").style.display = "none" + // If neither is true, it's not installed + return false +} + const startLife = 20;