Skip to content

Commit

Permalink
[FixaMinGata] Hide app badges when using PWABuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkri authored and dracos committed Jan 22, 2025
1 parent 13d30dc commit 3ed1e1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/web/fixamingata/footer_extra.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2 class="mysoc-footer__site-name">FixaMinGata</h2>
<p>Rapportera eller visa lokala problem. Var som helst i Sverige.</p>
</div>

<div class="fms-app-badges">
<div class="fms-app-badges" style="display: none;">
<a class="js-lazyload fms-app-badge fms-app-badge--ios" href="http://appstore.com/fixamingata">
FixaMinGata på App Store
</a>
Expand Down
10 changes: 10 additions & 0 deletions web/cobrands/fixamingata/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ if (window.$) {
fixmystreet.fixChromeAutocomplete
);
}

// Show the app badges if the app is not a PWABuilder progressive web app from
// the iOS App Store.
if (document.cookie.indexOf("app-platform=iOS App Store") === -1) {
var fmsAppBadges = document.getElementsByClassName("fms-app-badges")[0];

if (fmsAppBadges) {
fmsAppBadges.style.display = "block";
}
}

0 comments on commit 3ed1e1e

Please sign in to comment.