From df5058a0e67d70cc2297750f9590c9076506e10a Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Tue, 2 Jun 2020 13:22:23 +0200 Subject: [PATCH] Include PWACompat for iOS (#310) --- src/_js/main.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/_js/main.mjs b/src/_js/main.mjs index d31a29221..788757f0b 100644 --- a/src/_js/main.mjs +++ b/src/_js/main.mjs @@ -107,3 +107,10 @@ ga('send', 'pageview'); const gaScript = document.createElement('script'); gaScript.src = 'https://www.google-analytics.com/analytics.js'; document.head.appendChild(gaScript); + +// On Apple mobile devices add the proprietary app icon and splashscreen markup. +// No one should have to do this manually, and eventually this annoyance will +// go away once https://bugs.webkit.org/show_bug.cgi?id=183937 is fixed. +if (/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)) { + import('https://unpkg.com/pwacompat'); +}