Issue #181 fix NODEMO issue

This commit is contained in:
Peter Cottle 2014-06-29 16:32:27 -07:00
parent 2402a7a469
commit 3794dedc5c

View file

@ -180,29 +180,7 @@ var initDemo = function(sandbox) {
'levels'
];
commands = commands.join(';#').split('#'); // hax
} else if (!params.hasOwnProperty('NODEMO')) {
commands = [
"git help;",
"delay 1000;",
"help;",
"levels"
];
}
if (commands) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger('commandSubmitted', commands.join(''));
});
}
if (params.locale !== undefined && params.locale.length) {
GlobalState.locale = params.locale;
events.trigger('localeChanged');
} else {
tryLocaleDetect();
}
if (params.gist_level_id) {
} else if (params.gist_level_id) {
$.ajax({
url: 'https://api.github.com/gists/' + params.gist_level_id,
type: 'GET',
@ -224,6 +202,25 @@ var initDemo = function(sandbox) {
);
}
});
} else if (!params.hasOwnProperty('NODEMO')) {
commands = [
"git help;",
"delay 1000;",
"help;",
"levels"
];
}
if (commands) {
sandbox.mainVis.customEvents.on('gitEngineReady', function() {
eventBaton.trigger('commandSubmitted', commands.join(''));
});
}
if (params.locale !== undefined && params.locale.length) {
GlobalState.locale = params.locale;
events.trigger('localeChanged');
} else {
tryLocaleDetect();
}
if (params.command) {