error title
This commit is contained in:
parent
d51b674467
commit
d5007a747c
4 changed files with 51 additions and 23 deletions
|
@ -5,7 +5,7 @@ import * as messages from '../shared/messages';
|
|||
import ConsoleFrame from '../console/console-frame';
|
||||
import Follow from './follow';
|
||||
|
||||
let cmd = null;
|
||||
let vvConsole = new ConsoleFrame(window);
|
||||
|
||||
const invokeEvent = (action) => {
|
||||
if (typeof action === 'undefined' || action === null) {
|
||||
|
@ -14,14 +14,14 @@ const invokeEvent = (action) => {
|
|||
|
||||
switch (action[0]) {
|
||||
case actions.CMD_OPEN:
|
||||
cmd = new ConsoleFrame(window);
|
||||
vvConsole.showCommand('');
|
||||
break;
|
||||
case actions.CMD_TABS_OPEN:
|
||||
if (action[1] || false) {
|
||||
// alter url
|
||||
cmd = new ConsoleFrame(window, 'open ' + window.location.href);
|
||||
vvConsole.showCommand('open ' + window.location.href);
|
||||
} else {
|
||||
cmd = new ConsoleFrame(window, 'open ');
|
||||
vvConsole.showCommand('open ');
|
||||
}
|
||||
break;
|
||||
case actions.SCROLL_LINES:
|
||||
|
@ -75,10 +75,7 @@ window.addEventListener("keypress", (e) => {
|
|||
messages.receive(window, (message) => {
|
||||
switch (message.type) {
|
||||
case 'vimvixen.commandline.blur':
|
||||
if (cmd) {
|
||||
cmd.remove();
|
||||
cmd = null;
|
||||
}
|
||||
vvConsole.hide();
|
||||
break;
|
||||
case 'vimvixen.commandline.enter':
|
||||
browser.runtime.sendMessage({
|
||||
|
|
Reference in a new issue