From 65fedca9dfc4b85acce85b9eb3272cfc76d112a7 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 4 May 2020 16:18:12 +0900 Subject: Allow to change color scheme by "colorscheme" property --- src/console/clients/SettingClient.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/console/clients/SettingClient.ts (limited to 'src/console/clients') diff --git a/src/console/clients/SettingClient.ts b/src/console/clients/SettingClient.ts new file mode 100644 index 0000000..f75517a --- /dev/null +++ b/src/console/clients/SettingClient.ts @@ -0,0 +1,13 @@ +import Settings from "../../shared/settings/Settings"; +import * as messages from "../../shared/messages"; +import ColorScheme from "../../shared/ColorScheme"; + +export default class SettingClient { + async getColorScheme(): Promise { + const json = await browser.runtime.sendMessage({ + type: messages.SETTINGS_QUERY, + }); + const settings = Settings.fromJSON(json); + return settings.properties.colorscheme; + } +} -- cgit v1.2.3