mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-23 13:12:42 +01:00
26 lines
672 B
JavaScript
26 lines
672 B
JavaScript
app.run(function() {
|
|
|
|
var dispatcher = app.get('dispatcher');
|
|
|
|
dispatcher.commands({
|
|
'help': function() {
|
|
return new app.models.HelpResult();
|
|
},
|
|
'clear': function() {
|
|
app.controller('resultViewCtrl').clear();
|
|
},
|
|
'em': function() {
|
|
var cfg = app.get('cmdConfig');
|
|
cfg.emphasizeBytes = !cfg.emphasizeBytes;
|
|
}
|
|
});
|
|
|
|
// TODO: Make as function
|
|
dispatcher.command({
|
|
canHandle: function(input) { return app.get('expression').canParse(input); },
|
|
handle: function(input) {
|
|
return app.get('expression').parse(input);
|
|
}
|
|
});
|
|
});
|