From e66f604f2524e7d94d7e51fcc3b640b9a702d9f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 11:33:24 +0000 Subject: [PATCH] CMP: odstranjena koda, ki je dusila Googlovo sporocilo o privolitvi V AdSense je pod Privacy & messaging / European regulations sporocilo ze objavljeno in folx.tv je med izbranimi stranmi, prikazati pa se ni moglo, ker je client/index.html: window.googlefc.controlledMessagingFunction = message => message.proceed(false) sporocilo zavracal, funkcija hideGoogleCMP() pa je s CSS-om in MutationObserverjem sproti brisala vse elemente fc-* iz DOM-a. Oboje odstranjeno. Lastna pasica cookie-consent.tsx je bila samo importana in se sploh ni izrisovala (v App.tsx je ni bilo v drevesu), zato je stran do zdaj tekla brez kakrsnekoli privolitve - komponenta in import sta izbrisana. Posledica: promet iz EEA postane upravicen do personaliziranih oglasov namesto samo do non-personalized in limited. --- client/index.html | 26 ------------ client/src/App.tsx | 1 - client/src/components/cookie-consent.tsx | 54 ------------------------ 3 files changed, 81 deletions(-) delete mode 100644 client/src/components/cookie-consent.tsx diff --git a/client/index.html b/client/index.html index 5e7ef19..91e5d6f 100644 --- a/client/index.html +++ b/client/index.html @@ -35,32 +35,6 @@ - diff --git a/client/src/App.tsx b/client/src/App.tsx index 46933a1..ef79d79 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -22,7 +22,6 @@ import DatenschutzPage from "@/pages/datenschutz"; import KontaktPage from "@/pages/kontakt"; import AdminGalleryPage from "@/pages/admin-gallery"; import AdminPushPage from "@/pages/admin-push"; -import CookieConsent from "@/components/cookie-consent"; import MobileStickyAd from "@/components/mobile-sticky-ad"; // Vse povezave, ki vodijo z nase domene, se odprejo v novem zavihku. Delegiran diff --git a/client/src/components/cookie-consent.tsx b/client/src/components/cookie-consent.tsx deleted file mode 100644 index 4204b39..0000000 --- a/client/src/components/cookie-consent.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { useState, useEffect } from "react"; -import { X } from "lucide-react"; - -const CONSENT_KEY = "folx_cookie_consent"; - -export default function CookieConsent() { - const [visible, setVisible] = useState(false); - - useEffect(() => { - const consent = localStorage.getItem(CONSENT_KEY); - if (!consent) { - const timer = setTimeout(() => setVisible(true), 1500); - return () => clearTimeout(timer); - } - }, []); - - const accept = () => { - localStorage.setItem(CONSENT_KEY, "accepted"); - setVisible(false); - }; - - if (!visible) return null; - - return ( -
-
-
- Diese Website verwendet Cookies und Google-Dienste, um Ihnen das bestmögliche - Erlebnis zu bieten. Mit der Nutzung dieser Website stimmen Sie der Verwendung - von Cookies zu. -
-
- - -
-
-
- ); -}