feat #303: Container storage deletion and confirmation popup

This commit is contained in:
Rafee
2024-08-20 13:47:36 -04:00
parent ffbb740445
commit 606e08d2b7
8 changed files with 93 additions and 2 deletions
+15
View File
@@ -75,6 +75,21 @@ const backgroundLogic = {
return extensionInfo;
},
// Remove container data (cookies, localStorage and cache)
async deleteContainerDataOnly(userContextId) {
await this._closeTabs(userContextId);
await browser.browsingData.removeCookies({
cookieStoreId: this.cookieStoreId(userContextId)
});
await browser.browsingData.removeLocalStorage({
cookieStoreId: this.cookieStoreId(userContextId)
});
return {done: true, userContextId};
},
getUserContextIdFromCookieStoreId(cookieStoreId) {
if (!cookieStoreId) {
return false;