Add the AMO ID and use sync storage instead of local.
This commit is contained in:
parent
badcdb39c7
commit
35884ca433
|
@ -3,7 +3,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Queue",
|
||||
"description": "A WebExtension for queueing links.",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"permissions": [
|
||||
"contextMenus",
|
||||
"storage",
|
||||
|
@ -41,5 +41,10 @@
|
|||
"./content-scripts.ts"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "{c3560e6b-00e5-4ab3-b89e-8a54ee5b2c9f}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,7 @@ const defaultSettings: Settings = {
|
|||
* Returns the user's settings.
|
||||
*/
|
||||
export async function getSettings(): Promise<Settings> {
|
||||
// TODO: Replace local storage with sync storage.
|
||||
const syncSettings: any = await browser.storage.local.get(defaultSettings);
|
||||
const syncSettings: any = await browser.storage.sync.get(defaultSettings);
|
||||
const settings: Settings = {
|
||||
latestVersion: syncSettings.latestVersion,
|
||||
queue: syncSettings.queue
|
||||
|
@ -37,8 +36,7 @@ export async function getSettings(): Promise<Settings> {
|
|||
* @param settings The settings to save.
|
||||
*/
|
||||
export async function saveSettings(settings: Settings): Promise<Settings> {
|
||||
// TODO: Replace local storage with sync storage.
|
||||
await browser.storage.local.set(settings);
|
||||
await browser.storage.sync.set(settings);
|
||||
return settings;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue