Detect when browser.contextualIdentities.onRemoved is not supported

For #372
This commit is contained in:
kkapsner 2019-06-25 08:21:34 +02:00
parent 9ccaabd46a
commit 7cd89dec99
3 changed files with 21 additions and 6 deletions

View File

@ -59,11 +59,18 @@
settings.persistentRndStorage = newValue? JSON.stringify(scope.persistentRnd): ""; settings.persistentRndStorage = newValue? JSON.stringify(scope.persistentRnd): "";
}); });
logging.message("register contextual identities removal"); if (browser.contextualIdentities && browser.contextualIdentities.onRemoved){
browser.contextualIdentities.onRemoved.addListener(function(details){ logging.message("register contextual identities removal");
logging.message("Contextual identity", details.contextualIdentity.cookieStoreId, "removed."); browser.contextualIdentities.onRemoved.addListener(function(details){
clearContainerData(details.contextualIdentity.cookieStoreId); logging.message("Contextual identity", details.contextualIdentity.cookieStoreId, "removed.");
}); clearContainerData(details.contextualIdentity.cookieStoreId);
});
}
else {
logging.error(
"Old Firefox does not support browser.contextualIdentities.onRemoved"
);
}
}; };
const getInterval = function(){ const getInterval = function(){

View File

@ -6,7 +6,7 @@ Version 0.5.12:
- -
fixes: fixes:
- - detect when browser.contextualIdentities.onRemoved is not supported
known issues: known issues:
- if a data URL is blocked the page action button does not appear - if a data URL is blocked the page action button does not appear

View File

@ -29,6 +29,14 @@
{ {
"version": "0.5.12Alpha20190623", "version": "0.5.12Alpha20190623",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-0.5.12Alpha20190623-an+fx.xpi" "update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-0.5.12Alpha20190623-an+fx.xpi"
},
{
"version": "0.5.12Alpha20190624",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-0.5.12Alpha20190624-an+fx.xpi"
},
{
"version": "0.5.12Alpha20190625",
"update_link": "https://canvasblocker.kkapsner.de/versions/canvasblocker_beta-0.5.12Alpha20190625-an+fx.xpi"
} }
] ]
} }