aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-01 08:51:14 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-01 09:15:44 +0900
commit6e5286ef10b26d0a09f3882d6c3bfdbd92223d0f (patch)
tree40d46345e48d0567e1c65201ca9d55e428060172
parentf1b9c6ba9d33fe1927c4855d4981d88ad73d5818 (diff)
Rename command-line to console
-rw-r--r--manifest.json2
-rw-r--r--src/command-line/command-line.html18
-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.html18
-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.js8
-rw-r--r--webpack.config.js6
9 files changed, 35 insertions, 35 deletions
diff --git a/manifest.json b/manifest.json
index b687363..4922bd8 100644
--- a/manifest.json
+++ b/manifest.json
@@ -18,6 +18,6 @@
"sessions"
],
"web_accessible_resources": [
- "build/command-line.html"
+ "build/console.html"
]
}
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:
diff --git a/webpack.config.js b/webpack.config.js
index f34d203..ba08975 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -8,7 +8,7 @@ module.exports = {
entry: {
index: path.join(src, 'content'),
background: path.join(src, 'background'),
- 'command-line': path.join(src, 'command-line', 'command-line.js')
+ console: path.join(src, 'console', 'console.js')
},
output: {
@@ -43,8 +43,8 @@ module.exports = {
plugins: [
new HtmlWebpackPlugin({
- template: path.join(src, 'command-line', 'command-line.html'),
- filename: path.join(dist, 'command-line.html'),
+ template: path.join(src, 'console', 'console.html'),
+ filename: path.join(dist, 'console.html'),
inject: false
})
]