Skip to content

Commit

Permalink
Include PWACompat for iOS (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomayac authored Jun 2, 2020
1 parent 8822558 commit df5058a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/_js/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit df5058a

Please sign in to comment.