Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Combines __disableAndroidBanner and __disableIosSmartBanner into one …
Browse files Browse the repository at this point in the history
…variable __disableMobilePhoneBanner

 🐿 v2.8.0
  • Loading branch information
CourtneyLO committed May 8, 2018
1 parent 18c800f commit e5863bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions browser/layout/wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
<link rel="icon" type="image/png" href="https://www.ft.com/__origami/service/image/v2/images/raw/ftlogo-v1%3Abrand-ft-logo-square-coloured?source=update-logos&width=194&height=194&format=png" sizes="194x194">
<link rel="apple-touch-icon" sizes="180x180" href="https://www.ft.com/__origami/service/image/v2/images/raw/ftlogo-v1%3Abrand-ft-logo-square-coloured?source=update-logos&width=180&height=180&format=png">

{{#unless __disableIosSmartBanner}}
{{#unless __disableMobilePhoneBanner}}
<meta name="apple-itunes-app" content="app-id=1200842933, affiliate-data=ct=smart-banner&pt=246269, app-argument={{#if canonicalUrl}}{{canonicalUrl}}{{else}}https://www.ft.com{{/if}}">
{{/unless}}
{{#if __disableAndroidBanner}}
{{#if __disableMobilePhoneBanner}}
<script>
// Don't show the Android install banner
window.addEventListener('beforeinstallprompt', function (ev) { ev.preventDefault(); return false; });
Expand Down
3 changes: 1 addition & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ module.exports = options => {

// set whether or not to disable the app install banner.
app.use(function (req, res, next) {
app.locals.__disableAndroidBanner = !res.locals.flags.subscriberCohort;
app.locals.__disableIosSmartBanner = !res.locals.flags.subscriberCohort;
app.locals.__disableMobilePhoneBanner = !res.locals.flags.subscriberCohort;
next();
});

Expand Down

0 comments on commit e5863bf

Please sign in to comment.