diff --git a/src/components/ProxyRegistrar.astro b/src/components/ProxyRegistrar.astro index 42f89a7..a9cd044 100644 --- a/src/components/ProxyRegistrar.astro +++ b/src/components/ProxyRegistrar.astro @@ -17,8 +17,7 @@ form.addEventListener("submit", formEventListener); } - async function formEventListener(event) { - event.preventDefault(); + async function loadContent() { let loadingContent = document.getElementById("loading-content"); loadingContent.style.opacity = 1; let url = input.value.trim(); @@ -32,7 +31,6 @@ } else if (preference == "rammerhead") { // Check if rammerhead-session exists in cookies let rammerheadSession = getCookie("rammerhead-session"); - console.log(rammerheadSession); if (!rammerheadSession) { let session = await fetch("/newsession"); let sessionID = await session.text(); @@ -89,6 +87,12 @@ }); } + function formEventListener(event) { + event.preventDefault(); + loadContent(); + } + window.loadContent = loadContent; + function isUrl(val = "") { if (/^http(s?):\/\//.test(val) || (val.includes(".") && val.substr(0, 1) !== " ")) return true; return false; diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro index bfb2b3a..d2c71bc 100644 --- a/src/pages/[lang]/index.astro +++ b/src/pages/[lang]/index.astro @@ -16,7 +16,8 @@ export function getStaticPaths() {

{t("menu.welcome")}

- + +
Loading...
@@ -49,11 +50,13 @@ export function getStaticPaths() {