aboutsummaryrefslogtreecommitdiff
path: root/src/content/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/components')
-rw-r--r--src/content/components/top-content/find.ts36
-rw-r--r--src/content/components/top-content/index.ts2
2 files changed, 0 insertions, 38 deletions
diff --git a/src/content/components/top-content/find.ts b/src/content/components/top-content/find.ts
deleted file mode 100644
index c25cbeb..0000000
--- a/src/content/components/top-content/find.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import * as messages from '../../../shared/messages';
-import MessageListener from '../../MessageListener';
-
-import FindUseCase from '../../usecases/FindUseCase';
-
-let findUseCase = new FindUseCase();
-
-export default class FindComponent {
- constructor() {
- new MessageListener().onWebMessage(this.onMessage.bind(this));
- }
-
- onMessage(message: messages.Message) {
- switch (message.type) {
- case messages.CONSOLE_ENTER_FIND:
- return this.start(message.text);
- case messages.FIND_NEXT:
- return this.next();
- case messages.FIND_PREV:
- return this.prev();
- }
- return Promise.resolve();
- }
-
- start(text: string) {
- return findUseCase.startFind(text.length === 0 ? null : text);
- }
-
- next() {
- return findUseCase.findNext();
- }
-
- prev() {
- return findUseCase.findPrev();
- }
-}
diff --git a/src/content/components/top-content/index.ts b/src/content/components/top-content/index.ts
index de14b3f..0f07653 100644
--- a/src/content/components/top-content/index.ts
+++ b/src/content/components/top-content/index.ts
@@ -1,6 +1,5 @@
import CommonComponent from '../common';
import FollowController from './follow-controller';
-import FindComponent from './find';
import * as consoleFrames from '../../console-frames';
import * as messages from '../../../shared/messages';
import MessageListener from '../../MessageListener';
@@ -18,7 +17,6 @@ export default class TopContent {
new CommonComponent(win, store); // eslint-disable-line no-new
new FollowController(win, store); // eslint-disable-line no-new
- new FindComponent(); // eslint-disable-line no-new
// TODO make component
consoleFrames.initialize(this.win.document);