diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/background/index.js | 3 | ||||
-rw-r--r-- | src/console/console.js | 9 | ||||
-rw-r--r-- | src/console/console.scss | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/background/index.js b/src/background/index.js index 4a5e6d6..4aa3856 100644 --- a/src/background/index.js +++ b/src/background/index.js @@ -90,7 +90,8 @@ browser.runtime.onMessage.addListener((request, sender) => { return { caption: tab.title, content: tab.title, - url: tab.url + url: tab.url, + icon: tab.favIconUrl } }); return { diff --git a/src/console/console.js b/src/console/console.js index 3c7d61f..d139a50 100644 --- a/src/console/console.js +++ b/src/console/console.js @@ -43,7 +43,7 @@ const completeNext = () => { } let input = window.document.querySelector('#vimvixen-console-command-input'); - input.value = completionOrigin + item.content; + input.value = completionOrigin + ' ' + item.content; } const completePrev = () => { @@ -56,7 +56,7 @@ const completePrev = () => { } let input = window.document.querySelector('#vimvixen-console-command-input'); - input.value = completionOrigin + item.content; + input.value = completionOrigin + ' ' + item.content; } const handleKeydown = (e) => { @@ -80,6 +80,9 @@ const handleKeydown = (e) => { }; const handleKeyup = (e) => { + if (e.keyCode === KeyboardEvent.DOM_VK_TAB) { + return; + } if (e.target.value === prevValue) { return; } @@ -157,7 +160,7 @@ const setCompletions = (completions) => { window.completion = new Completion(flatten); let input = window.document.querySelector('#vimvixen-console-command-input'); - completionOrigin = input.value; + completionOrigin = input.value.split(' ')[0]; } messages.receive(window, (message) => { diff --git a/src/console/console.scss b/src/console/console.scss index b91e0b8..c22b14f 100644 --- a/src/console/console.scss +++ b/src/console/console.scss @@ -8,6 +8,7 @@ body { bottom: 0; left: 0; right: 0; + overflow: hidden; } .vimvixen-console { @@ -38,7 +39,9 @@ body { &-item { padding-left: 1.5rem; background-position: 0 center; + background-size: contain; background-repeat: no-repeat; + white-space: nowrap; &-caption { display: inline-block; |