diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-07-24 22:44:19 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-07-24 22:44:19 -0700 |
commit | eed630e9fa3c62610bda356e9c76393e70c1a08c (patch) | |
tree | f62eef3ee1c24d3ec89fa6192941a7f6e4e1557b /ext/bg/js/popup.js | |
parent | 32680c58b895e4c781cfb2f51a97fbff42e111b0 (diff) |
cleanup
Diffstat (limited to 'ext/bg/js/popup.js')
-rw-r--r-- | ext/bg/js/popup.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/bg/js/popup.js b/ext/bg/js/popup.js index 01994827..712839d9 100644 --- a/ext/bg/js/popup.js +++ b/ext/bg/js/popup.js @@ -18,16 +18,14 @@ $(document).ready(() => { - const commandExec = command => instYomi().onCommand(command); - - $('#open-search').click(() => commandExec('search')); - $('#open-options').click(() => commandExec('options')); - $('#open-help').click(() => commandExec('help')); + $('#open-search').click(() => utilCommandDispatch('search')); + $('#open-options').click(() => utilCommandDispatch('options')); + $('#open-help').click(() => utilCommandDispatch('help')); optionsLoad().then(options => { const toggle = $('#enable-search'); toggle.prop('checked', options.general.enable).change(); toggle.bootstrapToggle(); - toggle.change(() => commandExec('toggle')); + toggle.change(() => utilCommandDispatch('toggle')); }); }); |