Fix flipped conditional

This commit is contained in:
eyedeekay
2025-02-07 14:57:17 -05:00
parent bf641a4ff8
commit c5c7cc649e
2 changed files with 7 additions and 3 deletions

View File

@@ -37,8 +37,8 @@ clean: rc clean-artifacts
## EVEN RELEASES are AMO RELEASES
## ODD RELEASES are SELFHOSTED RELEASES
MOZ_VERSION=2.7.0
VERSION=2.7.1
MOZ_VERSION=2.8.0
VERSION=2.8.1
LAST_VERSION=$(shell grep '"version"' manifest.json | sed 's|"version"||g' | tr -d " :,'" | tr -d '"')

View File

@@ -58,6 +58,9 @@ function onContextsGot(contexts) {
});
}
// every time a window opens, call onContextsGot
browser.tabs.onCreated.addListener(onContextsGot);
function onContextsError() {
console.log("Error finding contextual identities, is the API enabled?");
}
@@ -327,10 +330,11 @@ async function onOpenedWindowCheck() {
}
onOpenedWindowCheck();
onContextsGot();
browser.tabs.onRemoved.addListener(onClosedWindowCheck);
if (browser.windows != undefined) {
if (browser.windows === undefined) {
console.log("windows unavailable on android", browser.runtime.PlatformOs);
browser.windows.onRemoved.addListener(onClosedWindowCheck);
browser.windows.onCreated.addListener(onOpenedWindowCheck);