Форум OlegON > Ресурсы OlegON > Вопросы сервера

anti-Adblock : Вопросы сервера

20.04.2024 11:34


10.04.2013 09:06
OlegON
 
Отключаю, поскольку решил избегать каких-либо ограничений на форуме, да и сам я AdBlock использую. Но, для памяти.
В "важную информацию" на форуме добавляю такой код
Код:
<style>#g08f{position:fixed!important;position:absolute;top:0;top:expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");left:0;width:100%;height:100%;background-color:#FCC;opacity:0.7;filter:alpha(opacity=70);display:block}#g08f p{opacity:1;filter:none;font:bold 16px Verdana,Arial,sans-serif;text-align:center;margin:20% 0}#g08f p a,#g08f p i{font-size:12px}#g08f ~ *{display:none}</style><noscript><b id=g08f><p>Please enable JavaScript!<br></p></b></noscript><script>(function(w,u){var d=w.document,z=typeof u;function g08f(){function c(c,i){var e=d.createElement('b'),b=d.body,s=b.style,l=b.childNodes.length;if(typeof i!=z){e.setAttribute('id',i);s.margin=s.padding=0;s.height='100%';l=Math.floor(Math.random()*l)+1}e.innerHTML=c;b.insertBefore(e,b.childNodes[l-1])}function g(i,t){return !t?d.getElementById(i):d.getElementsByTagName(t)};function f(v){if(!g('g08f')){c('<p>Пожалуйста, отключите блокировщик рекламы!<br>Тут ее не так много!<br></p>','g08f')}};(function(){var a=['ADSLOT_2','adBanner3','adSpace3','adbanner-home-left','divWrapper_Ad','fusionad','leftAd_rdr','ad','ads','adsense'],l=a.length,i,s='',e;for(i=0;i<l;i++){if(!g(a[i])){s+='<a id="'+a[i]+'"></a>'}}c(s);l=a.length;for(i=0;i<l;i++){e=g(a[i]);if(e.offsetParent==null||(w.getComputedStyle?d.defaultView.getComputedStyle(e,null).getPropertyValue('display'):e.currentStyle.display)=='none'){return f('#'+a[i])}}}());(function(){var o={'https://olegon.ru/advertisement.js':'nullok'},S=g(0,'script'),l=S.length-1,n,r,i,v,s;d.write=null;for(i=l;i>=0;--i){s=S[i];if(typeof o[s.src]!=z){n=d.createElement('script');n.type='text/javascript';n.src=s.src;v=o[s.src];w[v]=u;r=S[0];n.onload=n.onreadystatechange=function(){if(typeof w[v]==z&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){n.onload=n.onreadystatechange=null;r.parentNode.removeChild(n);w[v]=null}};r.parentNode.insertBefore(n,r);setTimeout(function(){if(w[v]!==null){f(n.src)}},2000);break}}}())}if(d.addEventListener){w.addEventListener('load',g08f,false)}else{w.attachEvent('onload',g08f)}})(window);</script>
раз в сутки запускаю скрипт
Код:
mysql -e "update vbphrase set text=(select replace(text,'g08f',concat('ok',(select DATE_FORMAT(now(),'%i%e%b')))) from okphraseshabl where phraseid=48132) where varname='notice_1_html'"
10.04.2013 09:09
OlegON
 
Еще вариант (advertisement.js присутствует в обоих)
Код:
<script type="text/javascript" src="advertisement.js"></script>

<script type="text/javascript">
if (document.getElementById("nullok") != undefined)
{
document.write('<p class="yes">No <strong>AdBlock Plus</strong> detected! Thanks for truly supporting our site.</p>');
}
else
{
document.write('<p class="no">We\'ve detected that you\'re using <strong>AdBlock Plus</strong> or some other adblocking software. Please be aware that this is only contributing to the demise of the site. We need money to operate the site, and almost all of that comes from our online advertising. To read more about why you should disable ABP, please <a href="#">click here</a>.<!-- end .content --></p><div id="nulltab"><font><center>Пожалуйста, отключите Adblock!</center></font><br></div> ');
}
</script>
Часовой пояс GMT +3, время: 11:34.

Форум на базе vBulletin®
Copyright © Jelsoft Enterprises Ltd.
В случае заимствования информации гипертекстовая индексируемая ссылка на Форум обязательна.