aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions/mark.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-10-12 10:14:33 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-10-12 10:14:33 +0900
commit003742ec51aa7aea9214442bc0b611e2eb5eaf6e (patch)
tree20345e48bd226c1e83a1145721f7ba585a1452aa /src/content/actions/mark.js
parent6e6e306275a8ee5632a22b1e30c807bd5ae9cc7e (diff)
Support global marks which select a tab
Diffstat (limited to 'src/content/actions/mark.js')
-rw-r--r--src/content/actions/mark.js20
1 files changed, 20 insertions, 0 deletions
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,
};