spot: more checks for bg
This commit is contained in:
parent
fa9c4d3398
commit
04a63e3f84
2 changed files with 5 additions and 3 deletions
|
|
@ -943,7 +943,7 @@ export default defineBackground(() => {
|
|||
});
|
||||
}
|
||||
for (const tab of await chrome.tabs.query({})) {
|
||||
if (tab.url?.match(/(chrome|chrome-extension):\/\//gi)) {
|
||||
if (tab.url?.match(/(chrome|chrome-extension):\/\//gi) || !tab.id) {
|
||||
continue;
|
||||
}
|
||||
const res = await browser.scripting.executeScript({
|
||||
|
|
@ -953,6 +953,7 @@ export default defineBackground(() => {
|
|||
console.log('restoring content at', res)
|
||||
}
|
||||
await checkTokenValidity();
|
||||
void initializeOffscreenDocument();
|
||||
});
|
||||
void initializeOffscreenDocument();
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ export default defineContentScript({
|
|||
append: "first",
|
||||
onMount: (container, s, host) => {
|
||||
Object.assign(host.style, { visibility: "visible", display: "block" });
|
||||
|
||||
return render(
|
||||
() => (
|
||||
<ControlsBox
|
||||
|
|
@ -55,7 +54,9 @@ export default defineContentScript({
|
|||
unmount?.();
|
||||
},
|
||||
});
|
||||
|
||||
ctx.onInvalidated(() => {
|
||||
ui.remove();
|
||||
});
|
||||
let micResponse: boolean | null = null;
|
||||
const getMicStatus = async () => {
|
||||
return new Promise((res) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue