1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

browser.windows.onRemoved not available on Fenix

Fix #654
This commit is contained in:
kkapsner 2023-05-29 21:39:02 +02:00
parent 8dcfac442f
commit 02dfa8bd1b
2 changed files with 15 additions and 9 deletions

View File

@ -89,15 +89,6 @@
}; };
}(); }();
browser.windows.onRemoved.addListener(async function(){
const windows = await browser.windows.getAll();
if (windows.every(function(window){
return !window.incognito;
})){
clearIncognito();
}
});
function registerTimeout(){ function registerTimeout(){
const interval = getInterval(); const interval = getInterval();
if (interval > 0){ if (interval > 0){
@ -173,4 +164,18 @@
scope.setDomainData = setDomainData; scope.setDomainData = setDomainData;
scope.clearDomainData = clearDomainData; scope.clearDomainData = clearDomainData;
scope.clearContainerData = clearContainerData; scope.clearContainerData = clearContainerData;
try {
browser.windows.onRemoved.addListener(async function(){
const windows = await browser.windows.getAll();
if (windows.every(function(window){
return !window.incognito;
})){
clearIncognito();
}
});
}
catch (error){
logging.error("Unable to register windows.onRemoved listener", error);
}
}()); }());

View File

@ -7,6 +7,7 @@ Version 1.10:
fixes: fixes:
- always protect about:blank - always protect about:blank
- persistent rng not working in Firefox for Android
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