mirror of
https://github.com/bytedream/stream-bypass.git
synced 2026-08-05 05:20:41 +02:00
use host id instead of host in settings
This commit is contained in:
@@ -34,7 +34,7 @@ export default defineBackground(() => {
|
||||
const host = await getHost(new URL(details.url).hostname);
|
||||
if (!host) return;
|
||||
|
||||
await HostSettings.addTemporaryHostDomain(host, new URL(details.redirectUrl).hostname);
|
||||
await HostSettings.addTemporaryHostDomain(host.id, new URL(details.redirectUrl).hostname);
|
||||
},
|
||||
{ urls: ['<all_urls>'], types: ['main_frame', 'sub_frame'] }
|
||||
);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<Toggle
|
||||
bind:checked={
|
||||
() => !disabledHostIds.includes(host.id),
|
||||
(v) => (v ? HostSettings.removeDisabledHost(host) : HostSettings.addDisabledHost(host))
|
||||
(v) => (v ? HostSettings.removeDisabledHost(host.id) : HostSettings.addDisabledHost(host.id))
|
||||
}
|
||||
size="sm"
|
||||
></Toggle>
|
||||
|
||||
Reference in New Issue
Block a user