aboutsummaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-03 21:31:25 +0900
committerGitHub <noreply@github.com>2017-10-03 21:31:25 +0900
commit3244c3c35db7639dc1bb08d9b0bcd40323e9d626 (patch)
tree1acf04feeb4b246240e573744306d227620c7294 /src/content
parentb5e52a75d760c23d2ac7257056f9ba592ad17b34 (diff)
parent4b5616b5244f14a8e6b1edf59e944edb7d8ae2d4 (diff)
Merge pull request #16 from ueokande/enable-keys
Enable keys on github.com
Diffstat (limited to 'src/content')
-rw-r--r--src/content/index.js19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/content/index.js b/src/content/index.js
index 0dbc8c1..655bea4 100644
--- a/src/content/index.js
+++ b/src/content/index.js
@@ -4,6 +4,7 @@ import * as scrolls from '../content/scrolls';
import * as navigates from '../content/navigates';
import * as followActions from '../actions/follow';
import * as store from '../store';
+import ContentInputComponent from '../components/content-input';
import FollowComponent from '../components/follow';
import followReducer from '../reducers/follow';
import operations from '../operations';
@@ -18,25 +19,11 @@ followStore.subscribe(() => {
console.error(e);
}
});
+// eslint-disable-next-line no-unused-vars
+const contentInputComponent = new ContentInputComponent(window);
consoleFrames.initialize(window.document);
-window.addEventListener('keypress', (e) => {
- if (e.target instanceof HTMLInputElement ||
- e.target instanceof HTMLTextAreaElement ||
- e.target instanceof HTMLSelectElement) {
- if (e.key === 'Escape' && e.target.blur) {
- e.target.blur();
- }
- return;
- }
- browser.runtime.sendMessage({
- type: messages.KEYDOWN,
- code: e.which,
- ctrl: e.ctrlKey
- });
-});
-
const execOperation = (operation) => {
switch (operation.type) {
case operations.SCROLL_LINES: