add reload button

This commit is contained in:
wearrrrr 2024-11-20 18:31:04 -06:00
parent a4efd90c0d
commit b0760dd553
3 changed files with 17 additions and 7 deletions

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="#fff" d="M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z" />
</svg>

After

Width:  |  Height:  |  Size: 464 B

View file

@ -84,10 +84,11 @@
const iframe = document.getElementById("proxy-frame") as HTMLIFrameElement; const iframe = document.getElementById("proxy-frame") as HTMLIFrameElement;
const topbar = document.getElementById("top-bar") as HTMLDivElement; const topbar = document.getElementById("top-bar") as HTMLDivElement;
const closeButton = document.getElementById("close-button") as HTMLButtonElement; const closeButton = document.getElementById("close-button")!;
const backwardsButton = document.getElementById("nav-backwards") as HTMLImageElement; const backwardsButton = document.getElementById("nav-backwards")!;
const forwardsButton = document.getElementById("nav-forwards") as HTMLImageElement; const forwardsButton = document.getElementById("nav-forwards")!;
const shareButton = document.getElementById("nav-share") as HTMLImageElement; const reloadButton = document.getElementById("nav-reload")!;
const shareButton = document.getElementById("nav-share")!;
const preference = Alu.store.get("proxy").value; const preference = Alu.store.get("proxy").value;
if (preference === "ultraviolet") { if (preference === "ultraviolet") {
iframe.src = window.__uv$config.prefix + window.__uv$config.encodeUrl(url); iframe.src = window.__uv$config.prefix + window.__uv$config.encodeUrl(url);
@ -150,6 +151,11 @@
iframe.contentWindow.history.back(); iframe.contentWindow.history.back();
} }
}; };
reloadButton.onclick = () => {
if (iframe.contentWindow) {
iframe.contentWindow.location.reload();
}
};
shareButton.onclick = () => { shareButton.onclick = () => {
const proxyFrame = document.getElementById("proxy-frame") as HTMLIFrameElement; const proxyFrame = document.getElementById("proxy-frame") as HTMLIFrameElement;
if (proxy.value === "rammerhead") { if (proxy.value === "rammerhead") {

View file

@ -34,9 +34,10 @@ export function getStaticPaths() {
</div> </div>
<div class="top-bar-right"> <div class="top-bar-right">
<div class="nav-container"> <div class="nav-container">
<img width="32px" height="32px" id="nav-backwards" src="/img/nav/backwards.svg" alt="Backwards Arrow" /> <img width="32px" height="32px" id="nav-backwards" src="/img/nav/backwards.svg" alt="Backward" />
<img width="32px" height="32px" id="nav-forwards" src="/img/nav/forwards.svg" alt="Forwards Arrow" /> <img width="32px" height="32px" id="nav-forwards" src="/img/nav/forwards.svg" alt="Forward" />
<img width="32px" height="32px" id="nav-share" src="/img/nav/share.svg" alt="Share Page" /> <img width="28px" height="32px" id="nav-reload" src="/img/nav/reload.svg" alt="Reload Page" />
<img width="28px" height="32px" id="nav-share" src="/img/nav/share.svg" alt="Share Page" />
</div> </div>
<button id="close-button">Close</button> <button id="close-button">Close</button>
</div> </div>