diff options
Diffstat (limited to 'src/content/components/top-content/find.ts')
-rw-r--r-- | src/content/components/top-content/find.ts | 36 |
1 files changed, 0 insertions, 36 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(); - } -} |