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.
This commit is contained in:
Claude
2026-08-28 11:33:24 +00:00
parent 656be0cbff
commit e66f604f25
3 changed files with 0 additions and 81 deletions
-26
View File
@@ -35,32 +35,6 @@
<link rel="apple-touch-icon" href="/favicon.png" />
<link rel="shortcut icon" href="/favicon.png" />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4465464714854276" crossorigin="anonymous"></script>
<script>
window.googlefc = window.googlefc || {};
window.googlefc.ccpa = window.googlefc.ccpa || {};
window.googlefc.callbackQueue = window.googlefc.callbackQueue || [];
window.googlefc.controlledMessagingFunction = function(message) { message.proceed(false); };
(function hideGoogleCMP() {
var style = document.createElement('style');
style.textContent = '.fc-consent-root,.fc-dialog-container,.fc-dialog-overlay,div[id^="fc-"],div[class^="fc-"]{display:none!important;visibility:hidden!important}';
document.head.appendChild(style);
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(m) {
m.addedNodes.forEach(function(node) {
if (node.nodeType === 1) {
var id = node.id || '';
var cls = node.className || '';
if (id.indexOf('fc-') === 0 || (typeof cls === 'string' && cls.indexOf('fc-') >= 0)) {
node.style.display = 'none';
node.remove();
}
}
});
});
});
observer.observe(document.documentElement, { childList: true, subtree: true });
})();
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Fira+Code:wght@300..700&family=Geist+Mono:wght@100..900&family=Geist:wght@100..900&family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400..700;1,400..700&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@100..900&family=Oxanium:wght@200..800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&family=Space+Grotesk:wght@300..700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">