better mobile alert

This commit is contained in:
Peter Cottle 2013-10-26 14:56:15 -07:00
parent 1e152858a2
commit fee6bf48af
2 changed files with 7 additions and 6 deletions

View file

@ -125,6 +125,12 @@ var initDemo = function(sandbox) {
// being the smart programmer I am (not), I dont include a true value on demo, so
// I have to check if the key exists here
var commands;
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger('commandSubmitted', 'mobile alert');
});
}
if (params.hasOwnProperty('demo')) {
commands = [
"git commit; git checkout -b bugFix C1; git commit; git merge master; git checkout master; git commit; git rebase bugFix;",
@ -193,11 +199,6 @@ var initDemo = function(sandbox) {
});
}
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent) || /android/i.test(navigator.userAgent)) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger('commandSubmitted', 'mobile alert');
});
}
};
if (require('../util').isBrowser()) {