aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-06-14 23:14:51 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-07-05 21:32:43 +0900
commit65cf6f0842d8d5933dc13b3767b1baf398d68cd5 (patch)
treedf9a8b139fd98adb79f075ba655d1303bdf3fd1d /src/console
parentcaced372415a944c4297157397d0027ba629fff0 (diff)
Implement FindNextOperator
Diffstat (limited to 'src/console')
-rw-r--r--src/console/app/hooks.ts11
1 files changed, 4 insertions, 7 deletions
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;
};