blob: 87fb50b14c68ede2ada8cefd79240b417cea8af8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { JSONTextSettings, SettingSource } from "../../src/shared/SettingData";
import Settings from "../../src/shared/settings/Settings";
export default class SettingRepository {
constructor(private readonly browser: any) {}
async saveJSON(settings: Settings): Promise<void> {
await this.browser.storage.sync.set({
settings: {
source: SettingSource.JSON,
json: JSONTextSettings.fromSettings(settings).toJSONText(),
},
});
}
}
|