From 8a56a271bcc81d1b969791dad9ce496360a35ef8 Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Fri, 23 Feb 2024 13:02:40 +0100 Subject: [PATCH] Make PWA run standalone (fixes #264) --- public/manifest.json | 2 +- public/scripts/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/manifest.json b/public/manifest.json index 63a9bb9..4a3239b 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -28,7 +28,7 @@ "background_color": "#efefef", "start_url": "/", "scope": "/", - "display": "minimal-ui", + "display": "standalone", "theme_color": "#3367d6", "screenshots" : [ { diff --git a/public/scripts/main.js b/public/scripts/main.js index 9def333..750d7f9 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -101,7 +101,7 @@ class PairDrop { } onPwaInstallable(e) { - if (!window.matchMedia('(display-mode: minimal-ui)').matches) { + if (!window.matchMedia('(display-mode: standalone)').matches) { // only display install btn when not installed this.$headerInstallBtn.removeAttribute('hidden'); this.$headerInstallBtn.addEventListener('click', () => {