SpaceApper/scripts/storage.mjs

18 lines
280 B
JavaScript
Raw Normal View History

2024-07-28 23:22:45 +02:00
export { storeApps, getApps };
async function storeApps(apps) {
await browser.storage.sync.set({
apps: apps,
});
}
async function getApps() {
const res = await browser.storage.sync.get("apps");
if (res.apps === undefined) {
return [];
}
return res.apps;
}