mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Detect when browser.contextualIdentities.onRemoved is not supported
For #372
This commit is contained in:
parent
9ccaabd46a
commit
7cd89dec99
3 changed files with 21 additions and 6 deletions
|
@ -59,11 +59,18 @@
|
|||
settings.persistentRndStorage = newValue? JSON.stringify(scope.persistentRnd): "";
|
||||
});
|
||||
|
||||
logging.message("register contextual identities removal");
|
||||
browser.contextualIdentities.onRemoved.addListener(function(details){
|
||||
logging.message("Contextual identity", details.contextualIdentity.cookieStoreId, "removed.");
|
||||
clearContainerData(details.contextualIdentity.cookieStoreId);
|
||||
});
|
||||
if (browser.contextualIdentities && browser.contextualIdentities.onRemoved){
|
||||
logging.message("register contextual identities removal");
|
||||
browser.contextualIdentities.onRemoved.addListener(function(details){
|
||||
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(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue