aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-22 17:45:16 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-22 20:14:38 +0900
commitc6eb5553d0477f96b5edd48012b4c4ab342f026c (patch)
treec782e23fab00da0dc0106a70a50813fee7acec72 /src/content/actions
parent7639e99b755e372712dca36e077a85d9a025cd9f (diff)
add setting actions in content
Diffstat (limited to 'src/content/actions')
-rw-r--r--src/content/actions/index.js7
-rw-r--r--src/content/actions/input.js9
-rw-r--r--src/content/actions/setting.js10
3 files changed, 16 insertions, 10 deletions
diff --git a/src/content/actions/index.js b/src/content/actions/index.js
index 085d510..83fa7cf 100644
--- a/src/content/actions/index.js
+++ b/src/content/actions/index.js
@@ -1,12 +1,15 @@
export default {
- // User input
+ // Enable/disable
ADDON_ENABLE: 'addon.enable',
ADDON_DISABLE: 'addon.disable',
ADDON_TOGGLE_ENABLED: 'addon.toggle.enabled',
+ // Settings
+ SETTING_SET: 'setting.set',
+
+ // User input
INPUT_KEY_PRESS: 'input.key,press',
INPUT_CLEAR_KEYS: 'input.clear.keys',
- INPUT_SET_KEYMAPS: 'input.set.keymaps',
// Completion
COMPLETION_SET_ITEMS: 'completion.set.items',
diff --git a/src/content/actions/input.js b/src/content/actions/input.js
index 31cfee3..465a486 100644
--- a/src/content/actions/input.js
+++ b/src/content/actions/input.js
@@ -13,11 +13,4 @@ const clearKeys = () => {
};
};
-const setKeymaps = (keymaps) => {
- return {
- type: actions.INPUT_SET_KEYMAPS,
- keymaps,
- };
-};
-
-export { keyPress, clearKeys, setKeymaps };
+export { keyPress, clearKeys };
diff --git a/src/content/actions/setting.js b/src/content/actions/setting.js
new file mode 100644
index 0000000..c874294
--- /dev/null
+++ b/src/content/actions/setting.js
@@ -0,0 +1,10 @@
+import actions from 'content/actions';
+
+const set = (value) => {
+ return {
+ type: actions.SETTING_SET,
+ value,
+ };
+};
+
+export { set };