From 65cf6f0842d8d5933dc13b3767b1baf398d68cd5 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 14 Jun 2021 23:14:51 +0900 Subject: Implement FindNextOperator --- src/console/app/hooks.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/console/app/hooks.ts') diff --git a/src/console/app/hooks.ts b/src/console/app/hooks.ts index eefdea3..00ac05c 100644 --- a/src/console/app/hooks.ts +++ b/src/console/app/hooks.ts @@ -103,13 +103,10 @@ export const useExecCommand = () => { export const useExecFind = () => { const execFind = React.useCallback((text?: string) => { - window.top.postMessage( - JSON.stringify({ - type: messages.CONSOLE_ENTER_FIND, - text, - }), - "*" - ); + browser.runtime.sendMessage({ + type: messages.CONSOLE_ENTER_FIND, + keyword: text, + }); }, []); return execFind; }; -- cgit v1.2.3