mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-13 06:10:01 -04:00
make url bar update on navigate
This commit is contained in:
parent
099b191981
commit
2f666df2ed
1 changed files with 8 additions and 1 deletions
|
@ -139,6 +139,13 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function frameLoad() {
|
||||||
|
if (!import.meta.env.VITE_ADRIFT_SINGLEFILE) {
|
||||||
|
url = __uv$config.decodeUrl(
|
||||||
|
proxyIframe.contentDocument?.location.href.replace(/.*\//g, "")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if ready}
|
{#if ready}
|
||||||
|
@ -147,7 +154,7 @@
|
||||||
<input bind:value={url} type="text" />
|
<input bind:value={url} type="text" />
|
||||||
<button on:click={() => visitURL(url)}>Go!</button>
|
<button on:click={() => visitURL(url)}>Go!</button>
|
||||||
</div>
|
</div>
|
||||||
<iframe class="h-full w-full" bind:this={proxyIframe} />
|
<iframe class="h-full w-full" bind:this={proxyIframe} on:load={frameLoad} />
|
||||||
</div>
|
</div>
|
||||||
{:else if !import.meta.env.VITE_ADRIFT_DEV}
|
{:else if !import.meta.env.VITE_ADRIFT_DEV}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue