diff options
Diffstat (limited to 'src/background/repositories/PersistentSettingRepository.js')
-rw-r--r-- | src/background/repositories/PersistentSettingRepository.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/background/repositories/PersistentSettingRepository.js b/src/background/repositories/PersistentSettingRepository.js new file mode 100644 index 0000000..4cab107 --- /dev/null +++ b/src/background/repositories/PersistentSettingRepository.js @@ -0,0 +1,12 @@ +import Setting from '../domains/Setting'; + +export default class SettingRepository { + async load() { + let { settings } = await browser.storage.local.get('settings'); + if (!settings) { + return null; + } + return Setting.deserialize(settings); + } +} + |