From a988d962f145b40c680ae743051d2ad850afb45e Mon Sep 17 00:00:00 2001 From: Continuities Date: Fri, 8 Jul 2016 18:41:10 -0400 Subject: [PATCH] Add link to Google Play --- script/engine.js | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/script/engine.js b/script/engine.js index 003477f..71847a1 100644 --- a/script/engine.js +++ b/script/engine.js @@ -135,8 +135,8 @@ $('') .addClass('appStore menuBtn') - .text(_('app store.')) - .click(function() { window.open('https://itunes.apple.com/app/apple-store/id736683061?pt=2073437&ct=adrproper&mt=8'); }) + .text(_('get the app.')) + .click(Engine.getApp) .appendTo(menu); $('') @@ -403,6 +403,33 @@ } }, + getApp: function() { + Events.startEvent({ + title: _('Get the App'), + scenes: { + start: { + text: [_('bring the room with you.')], + buttons: { + 'ios': { + text: _('ios'), + nextScene: 'end', + onChoose: function () { + window.open('https://itunes.apple.com/app/apple-store/id736683061?pt=2073437&ct=adrproper&mt=8'); + } + }, + 'android': { + text: _('android'), + nextScene: 'end', + onChoose: function() { + window.open('https://play.google.com/store/apps/details?id=com.yourcompany.adarkroom'); + } + } + } + } + } + }) + }, + share: function() { Events.startEvent({ title: _('Share'),