diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-01 08:51:14 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-09-01 09:15:44 +0900 |
commit | 6e5286ef10b26d0a09f3882d6c3bfdbd92223d0f (patch) | |
tree | 40d46345e48d0567e1c65201ca9d55e428060172 /src | |
parent | f1b9c6ba9d33fe1927c4855d4981d88ad73d5818 (diff) |
Rename command-line to console
Diffstat (limited to 'src')
-rw-r--r-- | src/command-line/command-line.html | 18 | ||||
-rw-r--r-- | src/console/console-frame.js (renamed from src/command-line/command-line-frame.js) | 8 | ||||
-rw-r--r-- | src/console/console-frame.scss (renamed from src/command-line/command-line-frame.scss) | 2 | ||||
-rw-r--r-- | src/console/console.html | 18 | ||||
-rw-r--r-- | src/console/console.js (renamed from src/command-line/command-line.js) | 4 | ||||
-rw-r--r-- | src/console/console.scss (renamed from src/command-line/command-line.scss) | 4 | ||||
-rw-r--r-- | src/content/index.js | 8 |
7 files changed, 31 insertions, 31 deletions
diff --git a/src/command-line/command-line.html b/src/command-line/command-line.html deleted file mode 100644 index bad0b66..0000000 --- a/src/command-line/command-line.html +++ /dev/null @@ -1,18 +0,0 @@ -<!doctype html> -<html> - <head> - <meta charset=utf-8 /> - <title>VimVixen command-line</title> - <script src='command-line.js'></script> - </head> - <body class='vimvixen-command-line'> - <div> - <p class='vimvixen-command-line-title'></p> - <div class='vimvixen-command-line-line'> - <i class='vimvixen-command-line-line-prompt'></i><input - id='vimvixen-command-line-line-input' - class='vimvixen-command-line-line-input'></input> - </div> - </div> - </body> -</html> diff --git a/src/command-line/command-line-frame.js b/src/console/console-frame.js index 3f1dda4..cf72f25 100644 --- a/src/command-line/command-line-frame.js +++ b/src/console/console-frame.js @@ -1,13 +1,13 @@ -import './command-line-frame.scss'; +import './console-frame.scss'; -export default class CommandLineFrame { +export default class ConsoleFrame { constructor(win, initial = '') { - let url = browser.runtime.getURL('build/command-line.html') + + let url = browser.runtime.getURL('build/console.html') + '#' + encodeURIComponent(initial); let element = window.document.createElement('iframe'); element.src = url; - element.className = 'vimvixen-command-line-frame'; + element.className = 'vimvixen-console-frame'; win.document.body.append(element); this.element = element; diff --git a/src/command-line/command-line-frame.scss b/src/console/console-frame.scss index 88772d9..1bab2b0 100644 --- a/src/command-line/command-line-frame.scss +++ b/src/console/console-frame.scss @@ -1,4 +1,4 @@ -.vimvixen-command-line-frame { +.vimvixen-console-frame { margin: 0; padding: 0; bottom: 0; diff --git a/src/console/console.html b/src/console/console.html new file mode 100644 index 0000000..9177045 --- /dev/null +++ b/src/console/console.html @@ -0,0 +1,18 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8 /> + <title>VimVixen console</title> + <script src='console.js'></script> + </head> + <body class='vimvixen-console'> + <div> + <p class='vimvixen-console-title'></p> + <div class='vimvixen-console-command'> + <i class='vimvixen-console-command-prompt'></i><input + id='vimvixen-console-command-input' + class='vimvixen-console-command-input'></input> + </div> + </div> + </body> +</html> diff --git a/src/command-line/command-line.js b/src/console/console.js index 34f3f35..f8a91a6 100644 --- a/src/command-line/command-line.js +++ b/src/console/console.js @@ -1,4 +1,4 @@ -import './command-line.scss'; +import './console.scss'; const parent = window.parent; @@ -55,7 +55,7 @@ window.addEventListener('load', () => { initial = decodeURIComponent(hash.substring(1)); } - let input = window.document.querySelector('#vimvixen-command-line-line-input'); + let input = window.document.querySelector('#vimvixen-console-command-input'); input.addEventListener('blur', handleBlur); input.addEventListener('keydown', handleKeydown); input.addEventListener('keyup', handleKeyup); diff --git a/src/command-line/command-line.scss b/src/console/console.scss index 68a0a03..becc15c 100644 --- a/src/command-line/command-line.scss +++ b/src/console/console.scss @@ -10,7 +10,7 @@ body { right: 0; } -.vimvixen-command-line { +.vimvixen-console { border-top: 1px solid gray; bottom: 0; margin: 0; @@ -32,7 +32,7 @@ body { @include input-style; } - &-line { + &-command { background-color: white; display: flex; diff --git a/src/content/index.js b/src/content/index.js index 9bd4e15..591aa98 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -1,7 +1,7 @@ import * as scrolls from './scrolls'; import * as histories from './histories'; import * as actions from '../shared/actions'; -import CommandLineFrame from '../command-line/command-line-frame'; +import ConsoleFrame from '../console/console-frame'; import Follow from './follow'; let cmd = null; @@ -13,14 +13,14 @@ const invokeEvent = (action) => { switch (action[0]) { case actions.CMD_OPEN: - cmd = new CommandLineFrame(window); + cmd = new ConsoleFrame(window); break; case actions.CMD_TABS_OPEN: if (action[1] || false) { // alter url - cmd = new CommandLineFrame(window, 'open ' + window.location.href); + cmd = new ConsoleFrame(window, 'open ' + window.location.href); } else { - cmd = new CommandLineFrame(window, 'open '); + cmd = new ConsoleFrame(window, 'open '); } break; case actions.SCROLL_LINES: |