From 3955fbabc9ed05116be07c9f659cd550734f8593 Mon Sep 17 00:00:00 2001
From: Berke Güzel <wenekar1@gmail.com>
Date: Mon, 9 Feb 2026 01:24:23 +0300
Subject: go FAST

---
 src/routes/+layout.svelte | 42 +-----------------------------------------
 1 file changed, 1 insertion(+), 41 deletions(-)

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

diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 19a7b85..0662a9a 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -1,53 +1,13 @@
 <script lang="ts">
-  import { onMount } from "svelte";
   import Header from "$lib/components/Header.svelte";
   import Footer from "$lib/components/Footer.svelte";
-  import favicon from "$lib/assets/favicon.svg";
   import "$lib/styles/global.css";
 
   let { children } = $props();
-
-  onMount(() => {
-    const loadAnalytics = () => {
-      if (document.querySelector('script[data-goatcounter-script="true"]'))
-        return;
-
-      const script = document.createElement("script");
-      script.src = "https://stats.wsap.dev/count.js";
-      script.async = true;
-      script.defer = true;
-      script.setAttribute("data-goatcounter", "https://stats.wsap.dev/count");
-      script.setAttribute("data-goatcounter-script", "true");
-      document.head.appendChild(script);
-    };
-
-    const runDeferredAnalytics = () => {
-      const idleWindow = window as Window & {
-        requestIdleCallback?: (
-          callback: IdleRequestCallback,
-          options?: IdleRequestOptions,
-        ) => number;
-      };
-
-      if (typeof idleWindow.requestIdleCallback === "function") {
-        idleWindow.requestIdleCallback(loadAnalytics, { timeout: 3000 });
-        return;
-      }
-      window.setTimeout(loadAnalytics, 1500);
-    };
-
-    if (document.readyState === "complete") {
-      runDeferredAnalytics();
-      return;
-    }
-
-    window.addEventListener("load", runDeferredAnalytics, { once: true });
-    return () => window.removeEventListener("load", runDeferredAnalytics);
-  });
 </script>
 
 <svelte:head>
-  <link rel="icon" href={favicon} />
+  <link rel="icon" href="/favicon.svg" />
   <meta name="color-scheme" content="light dark" />
 </svelte:head>
 
-- 
cgit v1.2.3

