diff options
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/console.html | 20 | ||||
| -rw-r--r-- | src/pages/console.js | 34 | ||||
| -rw-r--r-- | src/pages/console.scss | 92 | ||||
| -rw-r--r-- | src/pages/settings.html | 18 | ||||
| -rw-r--r-- | src/pages/settings.js | 15 | ||||
| -rw-r--r-- | src/pages/settings.scss | 8 |
6 files changed, 0 insertions, 187 deletions
diff --git a/src/pages/console.html b/src/pages/console.html deleted file mode 100644 index 4222f12..0000000 --- a/src/pages/console.html +++ /dev/null @@ -1,20 +0,0 @@ -<!doctype html> -<html> - <head> - <meta charset=utf-8 /> - <title>VimVixen console</title> - <script src='console.js'></script> - </head> - <body class='vimvixen-console'> - <p id='vimvixen-console-error' - class='vimvixen-console-error'></p> - <div id='vimvixen-console-command'> - <ul id='vimvixen-console-completion' class='vimvixen-console-completion'></ul> - <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/pages/console.js b/src/pages/console.js deleted file mode 100644 index b7be73d..0000000 --- a/src/pages/console.js +++ /dev/null @@ -1,34 +0,0 @@ -import './console.scss'; -import messages from 'content/messages'; -import CompletionComponent from 'components/completion'; -import ConsoleComponent from 'components/console'; -import reducers from 'reducers'; -import { createStore } from 'store'; -import * as consoleActions from 'actions/console'; - -const store = createStore(reducers); -let completionComponent = null; -let consoleComponent = null; - -window.addEventListener('load', () => { - let wrapper = document.querySelector('#vimvixen-console-completion'); - completionComponent = new CompletionComponent(wrapper, store); - - consoleComponent = new ConsoleComponent(document.body, store); -}); - -store.subscribe(() => { - completionComponent.update(); - consoleComponent.update(); -}); - -browser.runtime.onMessage.addListener((action) => { - switch (action.type) { - case messages.CONSOLE_SHOW_COMMAND: - return store.dispatch(consoleActions.showCommand(action.command)); - case messages.CONSOLE_SHOW_ERROR: - return store.dispatch(consoleActions.showError(action.text)); - case messages.CONSOLE_HIDE: - return store.dispatch(consoleActions.hide(action.command)); - } -}); diff --git a/src/pages/console.scss b/src/pages/console.scss deleted file mode 100644 index 5823dce..0000000 --- a/src/pages/console.scss +++ /dev/null @@ -1,92 +0,0 @@ -html, body, * { - margin: 0; - padding: 0; -} - -body { - position: absolute; - bottom: 0; - left: 0; - right: 0; - overflow: hidden; -} - -.vimvixen-console { - border-top: 1px solid gray; - bottom: 0; - margin: 0; - padding: 0; - - @mixin consoole-font { - font-style: normal; - font-family: monospace; - font-size: 12px; - line-height: 16px; - } - - &-completion { - background-color: white; - - @include consoole-font; - - &-title { - background-color: lightgray; - font-weight: bold; - margin: 0; - padding: 0; - } - - &-item { - padding-left: 1.5rem; - background-position: 0 center; - background-size: contain; - background-repeat: no-repeat; - white-space: nowrap; - - &.vimvixen-completion-selected { - background-color: yellow; - } - - &-caption { - display: inline-block; - width: 40%; - text-overflow: ellipsis; - overflow: hidden; - } - - &-url { - display: inline-block; - color: green; - width: 60%; - text-overflow: ellipsis; - overflow: hidden; - } - } - } - - &-error { - background-color: red; - font-weight: bold; - color: white; - - @include consoole-font; - } - - &-command { - background-color: white; - display: flex; - - &-prompt:before { - content: ':'; - - @include consoole-font; - } - - &-input { - border: none; - flex-grow: 1; - - @include consoole-font; - } - } -} diff --git a/src/pages/settings.html b/src/pages/settings.html deleted file mode 100644 index 99d6c6b..0000000 --- a/src/pages/settings.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset='utf-8'> - </head> - <body> - <h1>Configure</h1> - - <h2>Home page</h2> - <form id='vimvixen-settings-form' class='vimvixen-settings-form'> - <label for='load-from-json'>Load from JSON:</label> - <textarea name='plain-json' spellcheck='false'></textarea> - - <button type='submit'>Save</button> - </form> - <script src='settings.js'></script> - </body> -</html> diff --git a/src/pages/settings.js b/src/pages/settings.js deleted file mode 100644 index 6e25e6f..0000000 --- a/src/pages/settings.js +++ /dev/null @@ -1,15 +0,0 @@ -import './settings.scss'; -import SettingComponent from 'components/setting'; -import settingReducer from 'reducers/setting'; -import { createStore } from 'store'; - -const store = createStore(settingReducer); -let settingComponent = null; - -store.subscribe(() => { - settingComponent.update(); -}); - -document.addEventListener('DOMContentLoaded', () => { - settingComponent = new SettingComponent(document.body, store); -}); diff --git a/src/pages/settings.scss b/src/pages/settings.scss deleted file mode 100644 index 5707c8a..0000000 --- a/src/pages/settings.scss +++ /dev/null @@ -1,8 +0,0 @@ -.vimvixen-settings-form { - textarea[name=plain-json] { - font-family: monospace; - width: 100%; - min-height: 64ex; - resize: vertical; - } -} |
