AdBlock Engelleme Kodu 2021
AdBlock Engelleme Kodu 2021
Bir çok web sitesi sunucu masraflarını siteye koyduğu reklamlar sayesinde karşılıyor. Tabi bunun bilincinde olmayan bazı kullanıcılar bu sitelere AdBlock kullanarak giriyorlar ve reklamları görmeden siteden faydalanabiliyorlar.
İşte sizde bu durumdan yakaran bir site sahibi iseniz bu kodu kullanarak sitenize girenlerin reklamları engellemesine engel olabilirsiniz.
Kullanmak için yapmanız gereken tek şey aşağıdaki kodu reklam engelleyici ile girilmesini istemediğiniz sayfalarda "<body> Kodu buraya ekleyin </body> taglarinin arasına eklemek.
<style> #adblock-kullanicisi { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.8); text-align: center; box-sizing: border-box; padding-top: 50px; z-index: 9999999; } #adblock-kullanicisi .adblock-kullanicisi-ic { position: absolute; z-index: 99999999; background-color: rgba(245,245,245,1.00); box-sizing: border-box; width: auto; height: auto; left: 50%; top: 50%; margin-left: -400px; margin-top: -225px; padding: 40px; } #adblock-kullanicisi .adblock-kullanicisi-ic .bir { font-size: 32px; line-height: 32px; font-weight: 600; margin-bottom: 20px; } #adblock-kullanicisi .adblock-kullanicisi-ic .iki { font-size: 14px; line-height: 14px; } </style> <script type="text/javascript"> (function() { var test = document.createElement('div'); test.innerHTML = ' '; test.className = 'adsbox'; document.body.appendChild(test); window.setTimeout(function() { if (test.offsetHeight === 0) { document.body.classList.add('adblock'); document.getElementById('adblock-kullanicisi').style.display = 'block'; var scrollPosition = [ self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop ]; var html = jQuery('html'); html.data('scroll-position', scrollPosition); html.data('previous-overflow', html.css('overflow')); html.css('overflow', 'hidden'); window.scrollTo(scrollPosition[0], scrollPosition[1]); } test.remove(); }, 100); })(); </script> <div id="adblock-kullanicisi" style="padding:50px;"><div class="adblock-kullanicisi-ic"><img alt="stats" src="https://4.bp.blogspot.com/-l7m5ei0obNY/X7mjMxhV14I/AAAAAAAAHJQ/za8lR5GphhEaIkh-TqjWtAezetD_oO00QCK4BGAYYCw/s1600/Urhoba%2BLogosm.png" border="0" /><div style="padding:20px;"><a href="javascript: window.location.href=window.location;">Engelleyiciyi kapattım!</a></div></div></div>
Eğer ki kodun çalıştığından emin olmak istiyorsanız herhangi bir reklam engelleme programı kullanarak bu sayfaya girmeye çalışabilirsiniz.
Yorum Gönder