mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
Issue #181 fix NODEMO issue
This commit is contained in:
parent
2402a7a469
commit
3794dedc5c
1 changed files with 20 additions and 23 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue