rename command names

jh-changes
Shin'ya Ueoka 7 years ago
parent 3e2820a6b4
commit 30999e0c65
  1. 6
      src/console/console.js
  2. 6
      src/content/index.js

@ -8,20 +8,20 @@ var prevValue = "";
const blurMessage = () => { const blurMessage = () => {
return { return {
type: 'vimvixen.commandline.blur' type: 'vimvixen.command.blur'
}; };
}; };
const keydownMessage = (input) => { const keydownMessage = (input) => {
return { return {
type: 'vimvixen.commandline.enter', type: 'vimvixen.command.enter',
value: input.value value: input.value
}; };
}; };
const keyupMessage = (input) => { const keyupMessage = (input) => {
return { return {
type: 'vimvixen.commandline.change', type: 'vimvixen.command.change',
value: input.value value: input.value
}; };
}; };

@ -77,16 +77,16 @@ window.addEventListener("keypress", (e) => {
messages.receive(window, (message) => { messages.receive(window, (message) => {
switch (message.type) { switch (message.type) {
case 'vimvixen.commandline.blur': case 'vimvixen.command.blur':
vvConsole.hide(); vvConsole.hide();
break; break;
case 'vimvixen.commandline.enter': case 'vimvixen.command.enter':
browser.runtime.sendMessage({ browser.runtime.sendMessage({
type: 'event.cmd.enter', type: 'event.cmd.enter',
text: message.value text: message.value
}); });
break; break;
case 'vimvixen.commandline.change': case 'vimvixen.command.change':
browser.runtime.sendMessage({ browser.runtime.sendMessage({
type: 'event.cmd.suggest', type: 'event.cmd.suggest',
text: message.value text: message.value