Skip to content

Commit

Permalink
Stuff to quit from the game
Browse files Browse the repository at this point in the history
  • Loading branch information
jaseemabid committed Oct 11, 2011
1 parent 892c015 commit 9954277
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions js/xkcd_cli.js
Expand Up @@ -209,12 +209,14 @@ TerminalShell.commands['shutdown'] = TerminalShell.commands['poweroff'] = functi
}
};

TerminalShell.commands['stop'] =
TerminalShell.commands['logout'] =
TerminalShell.commands['exit'] =
TerminalShell.commands['quit'] = function(terminal) {
terminal.print('Bye.');
$('#prompt, #cursor').hide();
terminal.promptActive = false;
window.location = xkcd.baseE;
};

TerminalShell.commands['restart'] = TerminalShell.commands['reboot'] = function(terminal) {
Expand Down Expand Up @@ -684,9 +686,9 @@ TerminalShell.commands['welcome'] = function(terminal) {
terminal.print('use next prev and random to switch between questions.');
};

TerminalShell.commands['stop'] = function(terminal) {
window.location = xkcd.baseE;
}
TerminalShell.commands['end'] = function(terminal) {
terminal.print($('<h3>').text('Thanks for participating in the contest'));
};

TerminalShell.fallback = function(terminal, cmd) {
oneliners = {
Expand Down Expand Up @@ -779,9 +781,11 @@ $(document).ready(function() {
window.location = xkcd.baseE;
}
},1000);
} else if(getUrlVars()['end']) {
Terminal.runCommand('end');
} else {
Terminal.runCommand('cat welcome.txt');
}
}
});

});

0 comments on commit 9954277

Please sign in to comment.