cleanup data on startup

This commit is contained in:
Thomas Rupprecht 2022-12-25 17:18:58 +01:00
parent cbf21a24ad
commit 45c8deb007
1 changed files with 5 additions and 1 deletions

View File

@ -52,7 +52,7 @@ async function fetchNewData() {
type: 'basic',
title: browser.i18n.getMessage('stateNotificationTitle'),
message: browser.i18n.getMessage('stateNotificationMessage', state),
iconUrl: browser.runtime.getURL('icons/favicon.svg')
iconUrl: browser.runtime.getURL('icons/favicon.svg'),
});
}
}
@ -66,6 +66,10 @@ async function fetchNewData() {
}
}
browser.runtime.onStartup.addListener(async () => {
await browser.storage.local.remove(['calendar', 'spaceApi']);
});
/**
* @param {Alarm} alarm
*/