aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/SettingRepository.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-05-02 17:25:56 +0900
committerGitHub <noreply@github.com>2020-05-02 17:25:56 +0900
commit5df0537bcf65a341e79852b1b30379c73318529c (patch)
treeaee5efe52412855f620cb514a13a2c14373f27b7 /src/background/repositories/SettingRepository.ts
parent685f2b7b69218b06b5bb676069e35f79c5048c9b (diff)
parent75abd90ecb8201ad845b266f96220d8adfe19b2d (diff)
Merge pull request #749 from ueokande/qa-0.28
QA 0.28
Diffstat (limited to 'src/background/repositories/SettingRepository.ts')
-rw-r--r--src/background/repositories/SettingRepository.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/background/repositories/SettingRepository.ts b/src/background/repositories/SettingRepository.ts
index b522045..d726cfb 100644
--- a/src/background/repositories/SettingRepository.ts
+++ b/src/background/repositories/SettingRepository.ts
@@ -1,4 +1,4 @@
-import SettingData from '../../shared/SettingData';
+import SettingData from "../../shared/SettingData";
export default interface SettingRepository {
load(): Promise<SettingData | null>;
@@ -8,7 +8,7 @@ export default interface SettingRepository {
export class LocalSettingRepository implements SettingRepository {
async load(): Promise<SettingData | null> {
- const {settings} = await browser.storage.local.get('settings');
+ const { settings } = await browser.storage.local.get("settings");
if (!settings) {
return null;
}
@@ -17,7 +17,7 @@ export class LocalSettingRepository implements SettingRepository {
onChange(callback: () => void) {
browser.storage.onChanged.addListener((changes, area) => {
- if (area !== 'local') {
+ if (area !== "local") {
return;
}
if (changes.settings) {
@@ -29,7 +29,7 @@ export class LocalSettingRepository implements SettingRepository {
export class SyncSettingRepository implements SettingRepository {
async load(): Promise<SettingData | null> {
- const {settings} = await browser.storage.sync.get('settings');
+ const { settings } = await browser.storage.sync.get("settings");
if (!settings) {
return null;
}
@@ -38,7 +38,7 @@ export class SyncSettingRepository implements SettingRepository {
onChange(callback: () => void) {
browser.storage.onChanged.addListener((changes, area) => {
- if (area !== 'sync') {
+ if (area !== "sync") {
return;
}
if (changes.settings) {
@@ -46,4 +46,4 @@ export class SyncSettingRepository implements SettingRepository {
}
});
}
-} \ No newline at end of file
+}