From a2e67033c8e4c7b6cacf2933dbfc6776a81f9a4e Mon Sep 17 00:00:00 2001 From: MotorTruck1221 Date: Thu, 17 Oct 2024 04:03:18 -0600 Subject: [PATCH] Add loading to iFrame --- src/pages/[lang]/index.astro | 6 +++++- src/pages/loading.astro | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/pages/loading.astro diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro index edc5bc9..069068c 100644 --- a/src/pages/[lang]/index.astro +++ b/src/pages/[lang]/index.astro @@ -37,6 +37,8 @@ import { VERSION } from "astro:env/client";

Version: { VERSION }

@@ -102,8 +104,10 @@ import { VERSION } from "astro:env/client"; const input = document.getElementById("nebula-input") as HTMLInputElement; const iframe = document.getElementById("neb-iframe") as HTMLIFrameElement; const omnibox = document.getElementById("omnibox") as HTMLDivElement; + const copyright = document.getElementById("version") as HTMLDivElement; input?.addEventListener("keypress", async function (event: any) { - if (event.key === "Enter") { + if (event.key === "Enter") { + copyright.classList.add("hidden"); if (localStorage.getItem(Settings.ProxySettings.proxy) === "automatic") { const key = SupportedSites[input?.value]; switch(key) { diff --git a/src/pages/loading.astro b/src/pages/loading.astro new file mode 100644 index 0000000..4a10ecc --- /dev/null +++ b/src/pages/loading.astro @@ -0,0 +1,27 @@ +--- +import Loading from "@components/Loading.astro"; +import Layout from "@layouts/Layout.astro"; +--- + + + + +