aboutsummaryrefslogtreecommitdiff
path: root/src/content/components/common
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-19 21:46:51 +0900
committerGitHub <noreply@github.com>2017-10-19 21:46:51 +0900
commitc47a2075bcada9dbb1ab1076a92238d6ce48d347 (patch)
tree27308ee55c2b25a0609c8277909a6aff6b45021f /src/content/components/common
parent86431e82f75af48f1a8b98c95257714ff75261fc (diff)
parent71d35005b4b33e90a85dc50964cb96a8b462b748 (diff)
Merge pull request #84 from ueokande/14-lose-console-focus
Fix close focus
Diffstat (limited to 'src/content/components/common')
-rw-r--r--src/content/components/common/follow.js2
-rw-r--r--src/content/components/common/index.js5
-rw-r--r--src/content/components/common/input.js3
-rw-r--r--src/content/components/common/keymapper.js3
4 files changed, 5 insertions, 8 deletions
diff --git a/src/content/components/common/follow.js b/src/content/components/common/follow.js
index 92d8822..5688da3 100644
--- a/src/content/components/common/follow.js
+++ b/src/content/components/common/follow.js
@@ -34,6 +34,8 @@ export default class Follow {
this.newTab = false;
this.hints = {};
this.targets = [];
+
+ messages.onMessage(this.onMessage.bind(this));
}
update() {
diff --git a/src/content/components/common/index.js b/src/content/components/common/index.js
index 5e977ae..98a2337 100644
--- a/src/content/components/common/index.js
+++ b/src/content/components/common/index.js
@@ -21,18 +21,19 @@ export default class Common {
];
this.reloadSettings();
+
+ messages.onMessage(this.onMessage.bind(this));
}
update() {
this.children.forEach(c => c.update());
}
- onMessage(message, sender) {
+ onMessage(message) {
switch (message.type) {
case messages.SETTINGS_CHANGED:
this.reloadSettings();
}
- this.children.forEach(c => c.onMessage(message, sender));
}
reloadSettings() {
diff --git a/src/content/components/common/input.js b/src/content/components/common/input.js
index 8a7f82a..df09894 100644
--- a/src/content/components/common/input.js
+++ b/src/content/components/common/input.js
@@ -69,7 +69,4 @@ export default class InputComponent {
e.target.getAttribute('contenteditable').toLowerCase() === 'true' ||
e.target.getAttribute('contenteditable').toLowerCase() === '');
}
-
- onMessage() {
- }
}
diff --git a/src/content/components/common/keymapper.js b/src/content/components/common/keymapper.js
index 2a57b28..655c3f2 100644
--- a/src/content/components/common/keymapper.js
+++ b/src/content/components/common/keymapper.js
@@ -28,7 +28,4 @@ export default class KeymapperComponent {
this.store.dispatch(inputActions.clearKeys());
return true;
}
-
- onMessage() {
- }
}