mirror of
https://github.com/bytedream/stream-bypass.git
synced 2026-08-04 21:10:40 +02:00
fix per site settings being set for wrong domain
This commit is contained in:
@@ -26,23 +26,14 @@
|
|||||||
domain: data.domain
|
domain: data.domain
|
||||||
};
|
};
|
||||||
currentMatch = match;
|
currentMatch = match;
|
||||||
currentDomain = match.domain;
|
|
||||||
});
|
});
|
||||||
sendTabMessageToActiveTab(TabMessageType.RequestActiveMatch, undefined);
|
sendTabMessageToActiveTab(TabMessageType.RequestActiveMatch, undefined);
|
||||||
|
|
||||||
browser.tabs
|
browser.tabs.query({ active: true, currentWindow: true }).then((tabs) => {
|
||||||
.query({ active: true, currentWindow: true })
|
const url = tabs[0]?.url;
|
||||||
.then((tabs) => {
|
if (!url) return;
|
||||||
if (currentDomain) return;
|
currentDomain = new URL(url).hostname;
|
||||||
const url = tabs[0]?.url;
|
});
|
||||||
if (!url) return;
|
|
||||||
try {
|
|
||||||
currentDomain = new URL(url).hostname;
|
|
||||||
} catch {
|
|
||||||
/* ignore */
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
|
|
||||||
onDestroy(cancel);
|
onDestroy(cancel);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user