<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
// Çerez onayı olup olmadığını kontrol eder
if (!document.cookie.includes('privacy_policy_accepted=true')) {
// İçeriği gizle
document.body.style.display = 'none';
// Onay penceresi oluşturur
var consentPopup = document.createElement('div');
consentPopup.style.position = 'fixed';
consentPopup.style.top = '0';
consentPopup.style.left = '0';
consentPopup.style.right = '0';
consentPopup.style.bottom = '0';
consentPopup.style.backgroundColor = 'white';
consentPopup.style.color = 'black';
consentPopup.style.zIndex = '1000';
consentPopup.style.textAlign = 'center';
consentPopup.style.padding = '20px';
consentPopup.innerHTML = '<p>Bu site çerezler kullanır. Gizlilik politikamızı kabul etmeniz gerekmektedir.</p><a href="/privacy-policy" target="_blank">Gizlilik Politikamızı Oku</a><br><button id="accept-consent">Kabul Et</button>';
document.body.appendChild(consentPopup);
// Onay verildiğinde çerezi ayarlar ve içeriği gösterir
document.querySelector('#accept-consent').addEventListener('click', function () {
document.cookie = 'privacy_policy_accepted=true; path=/; max-age=31536000'; // 1 yıl geçerli çerez
document.body.style.display = 'block';
document.body.removeChild(consentPopup);
});
}
});
</script>Fakat bu da sadece bos bor sayfa gösteriyor. bunu nasil yapabilirim yardimci olursaniz sevinirim.
Gizlilik Politikasi kabul etmeden Icerik kısıtlama
0
●58
- 22-07-2024, 20:36:32Cümleten selamlar baslikta nda anlayaginiz üzere Complianz | GDPR/CCPA Cookie Consent eklentisi kullaniyorum. Cerezler de vs sorun yok. ama ben bunu cerezleri kabul etmeden sitede gezinemesinler islem yapamasinlar istiyorum. Eklenti de bu ayar yok kodla denedim.