Skip to content

Commit

Permalink
[FixaMinGata] Hide the default PWA installation banner
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkri committed Dec 27, 2022
1 parent 81a004b commit ee7c78e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions web/cobrands/fixamingata/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,14 @@ if (document.cookie.indexOf("app-platform=iOS App Store") === -1) {
fmsAppBadges.style.display = "block";
}
}

// Hide the default PWA installation banner since it covers important UI
// elements (https://github.com/mysociety/fixmystreet/issues/4153).
// deferredPrompt could be used to provide an in-app installation flow.
var deferredPrompt;

addEventListener("beforeinstallprompt", function (event) {
event.preventDefault();

deferredPrompt = event;
})

0 comments on commit ee7c78e

Please sign in to comment.