From 782ca3e8895ddccb84c97e26af450ada4b5b138a Mon Sep 17 00:00:00 2001
From: memdmp <memdmp@memeware.net>
Date: Sun, 12 Jan 2025 05:36:18 +0100
Subject: feat: new things

---
 src/routes/+page.svelte | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

(limited to 'src/routes/+page.svelte')

diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 701132b..dd06561 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -30,7 +30,21 @@
 
   const lanLeastSignificantIPPart = Math.floor(Math.random() * 253 + 2);
 
-  let isScripted = false;
+  let {
+    skipAnimation = false,
+  }: {
+    skipAnimation?: boolean;
+  } = $props();
+  onMount(() => {
+    const skipParam = new Boolean(
+      (new URLSearchParams(location.search).get("skip-animation") ?? "false") ||
+        "true",
+    );
+    if (skipParam) skipAnimation = skipParam.valueOf();
+    if (skipAnimation) window.history.pushState({}, "", "/skip-animation");
+  });
+
+  let isScripted = $state(false);
   onMount(() => (isScripted = true));
   onDestroy(() => (isScripted = false));
 </script>
@@ -110,9 +124,9 @@
       {/if}
     {:else}
       <span
-        on:click={() =>
+        onclick={() =>
           typeof section.url !== "function" ? void 0 : section.url(line)}
-        on:keypress={() =>
+        onkeypress={() =>
           typeof section.url !== "function" ? void 0 : section.url(line)}
         role="link"
         tabindex="0">{@render ttyTextInnerRenderer(section)}</span
@@ -150,7 +164,11 @@
   {/each}
 </div>
 
-<div class="fixed top-0 left-0 w-screen h-screen font-mono" id="app">
+<div
+  class="fixed top-0 left-0 w-screen h-screen font-mono"
+  id="app"
+  class:skip-animation={skipAnimation}
+>
   <div
     id="bios"
     class="flex flex-col items-center justify-between relative font-bios text-lg"
-- 
cgit v1.2.3

