aboutsummaryrefslogtreecommitdiff
path: root/src/content/actions/setting.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/actions/setting.ts')
-rw-r--r--src/content/actions/setting.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/content/actions/setting.ts b/src/content/actions/setting.ts
deleted file mode 100644
index 92f8559..0000000
--- a/src/content/actions/setting.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import * as actions from './index';
-import * as operations from '../../shared/operations';
-import * as messages from '../../shared/messages';
-import Settings, { Keymaps } from '../../shared/Settings';
-
-const reservedKeymaps: Keymaps = {
- '<Esc>': { type: operations.CANCEL },
- '<C-[>': { type: operations.CANCEL },
-};
-
-const set = (settings: Settings): actions.SettingAction => {
- return {
- type: actions.SETTING_SET,
- settings: {
- ...settings,
- keymaps: { ...settings.keymaps, ...reservedKeymaps },
- }
- };
-};
-
-const load = async(): Promise<actions.SettingAction> => {
- let settings = await browser.runtime.sendMessage({
- type: messages.SETTINGS_QUERY,
- });
- return set(settings);
-};
-
-export { set, load };