diff --git a/public/img/nav/reload.svg b/public/img/nav/reload.svg new file mode 100644 index 0000000..d0d37a8 --- /dev/null +++ b/public/img/nav/reload.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index 61dd0a5..7ad627f 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -84,10 +84,11 @@ const iframe = document.getElementById("proxy-frame") as HTMLIFrameElement; const topbar = document.getElementById("top-bar") as HTMLDivElement; - const closeButton = document.getElementById("close-button") as HTMLButtonElement; - const backwardsButton = document.getElementById("nav-backwards") as HTMLImageElement; - const forwardsButton = document.getElementById("nav-forwards") as HTMLImageElement; - const shareButton = document.getElementById("nav-share") as HTMLImageElement; + const closeButton = document.getElementById("close-button")!; + const backwardsButton = document.getElementById("nav-backwards")!; + const forwardsButton = document.getElementById("nav-forwards")!; + const reloadButton = document.getElementById("nav-reload")!; + const shareButton = document.getElementById("nav-share")!; const preference = Alu.store.get("proxy").value; if (preference === "ultraviolet") { iframe.src = window.__uv$config.prefix + window.__uv$config.encodeUrl(url); @@ -150,6 +151,11 @@ iframe.contentWindow.history.back(); } }; + reloadButton.onclick = () => { + if (iframe.contentWindow) { + iframe.contentWindow.location.reload(); + } + }; shareButton.onclick = () => { const proxyFrame = document.getElementById("proxy-frame") as HTMLIFrameElement; if (proxy.value === "rammerhead") { diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro index 1c6c0e7..5baea71 100644 --- a/src/pages/[lang]/index.astro +++ b/src/pages/[lang]/index.astro @@ -34,9 +34,10 @@ export function getStaticPaths() {