From 003742ec51aa7aea9214442bc0b611e2eb5eaf6e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Fri, 12 Oct 2018 10:14:33 +0900 Subject: Support global marks which select a tab --- src/content/actions/mark.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/content/actions') diff --git a/src/content/actions/mark.js b/src/content/actions/mark.js index 1f5174e..712a811 100644 --- a/src/content/actions/mark.js +++ b/src/content/actions/mark.js @@ -1,4 +1,5 @@ import actions from 'content/actions'; +import messages from 'shared/messages'; const startSet = () => { return { type: actions.MARK_START_SET }; @@ -21,6 +22,25 @@ const setLocal = (key, x, y) => { }; }; +const setGlobal = (key, x, y) => { + browser.runtime.sendMessage({ + type: messages.MARK_SET_GLOBAL, + key, + x, + y, + }); + return { type: '' }; +}; + +const jumpGlobal = (key) => { + browser.runtime.sendMessage({ + type: messages.MARK_JUMP_GLOBAL, + key, + }); + return { type: '' }; +}; + export { startSet, startJump, cancel, setLocal, + setGlobal, jumpGlobal, }; -- cgit v1.2.3