Cara Memasang Anti Adblock dengan tombol Close di Blog atau Website

Halo Sobat Designz Chan, pada pagi ini saya akan berbagi tutorial Cara memasang Script Anti Adblock dengan tombol Close detik di Blog.


Sebelumnya mungkin sobat pernah mendengar atau bahkan menggunakan Plugin AdBlock, atau mungkin baru tau saat ini.. AdBlock adalah Add on atau Browser Plugin pemblokir iklan yang sudah disediakan oleh browser Mozilla Firefox, Google Chrome, Opera, dll


Demo Tampilan Adblock :



Cara Penerapan :

Langkah pertama, silakan copy-kan script di bawah ini :
<style>#s141{position:fixed !important;position:absolute;top:3px;top:expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");left:0px;width:99%;height:100%;background:RGBA(0, 0, 0, 0.69) url('https://2.bp.blogspot.com/-1kFiX1CA-gA/V27lcbGX46I/AAAAAAAAChs/ro_wUpalr70_KWkfIFC1H0Gb5GJJXMMXgCLcB/s1600/blacktr.png');filter:alpha(opacity=95);display:block;padding:5% 0;z-index:2000;}#s141 *{text-align:center;margin:0 auto;display:block;filter:none;font:bold 14px Verdana,Arial,sans-serif;text-decoration:none}#s141 ~ *{}</style><div id="s141"><center>Please enable / Bitte aktiviere JavaScript!<br />Veuillez activer / Por favor activa el Javascript!</center></div><script>window.document.getElementById("s141").parentNode.removeChild(window.document.getElementById("s141"));(function(e,b){function d(f){f&&s141.nextFunction()}var c=e.document,a=["i","u"];d.prototype={rand:function(f){return Math.floor(Math.random()*f)},getElementBy:function(g,f){return g?c.getElementById(g):c.getElementsByTagName(f)},getStyle:function(g){var f=c.defaultView;return f&&f.getComputedStyle?f.getComputedStyle(g,null):g.currentStyle},deferExecution:function(f){setTimeout(f,2000)},insert:function(j,i){var o=c.createElement("center"),n=c.body,p=n.childNodes.length,h=n.style,l=0,k=0;if("s141"==i){o.setAttribute("id",i);h.margin=h.padding=0;h.height="100%";for(p=this.rand(p);l<p;l++){1==n.childNodes[l].nodeType&&(k=Math.max(k,parseFloat(this.getStyle(n.childNodes[l]).zIndex)||0))}k&&(o.style.zIndex=k+1);p++}o.innerHTML=j;n.insertBefore(o,n.childNodes[p-1])},r:function(g){var f=c.body.style;this.getElementBy(g).parentNode.removeChild(this.getElementBy(g));f.height=f.margin=f.padding=""},displayMessage:function(g){g="abisuq".charAt(this.rand(5));var f,h='<input type="button" onclick="s141.r(\'s141\')" value=10 disabled></'+g+">";this.insert("<"+g+'><img src="https://1.bp.blogspot.com/-paNJie2Oo-c/V27lUkZqV7I/AAAAAAAAChk/qD2lvxm17bMVe1RXvR_pdkpIsZoHo0gegCLcB/s1600/adblock-min.png"/> <a href="http://www.wikihow.com/Disable-Adblock">[ how to disable adblock ]</a>'+h,"s141");h=this.getElementBy("s141").firstChild.lastChild;f=setInterval(function(){h.value--;1>h.value&&(clearInterval(f),h.value="Close",h.disabled="")},1000)},i:function(){for(var h="WNAd49,ad_700x430,ad_O,ad_links,adsdaq72890,adv-title,text_ad,ad,ads,adsense".split(","),g=h.length,k="",j=this,l=0,i="abisuq".charAt(j.rand(5));l<g;l++){j.getElementBy(h[l])||(k+="<"+i+' id="'+h[l]+'"></'+i+">")}j.insert(k);j.deferExecution(function(){for(l=0;l<g;l++){if(null==j.getElementBy(h[l]).offsetParent||"none"==j.getStyle(j.getElementBy(h[l])).display){return j.displayMessage("#"+h[l]+"("+l+")")}}j.nextFunction()})},u:function(){var g=".nz/ads/,/ad728x.,/adboxtable-,/ads/serveIt/ad,/adv_horiz.,/livejasmin2.,/sidecol_ad.,/skin/ad3/ad,/smalltopl.,/300x250px-".split(","),f=this,i=f.getElementBy(0,"img"),h,j;i[0]!==b&&i[0].src!==b&&(h=new Image,h.onload=function(){j=this;j.onload=null;j.onerror=function(){a=null;f.displayMessage(j.src)};j.src=i[0].src+"#"+g.join("")},h.src=i[0].src);f.deferExecution(function(){f.nextFunction()})},nextFunction:function(){var f=a[0];f!==b&&(a.shift(),this[f]())}};e.s141=s141=new d;c.addEventListener?e.addEventListener("load",d,!1):e.attachEvent("onload",d)})(window);</script>

Penjelasan :
https://1.bp.blogspot.com/-paNJie2Oo-c/V27lUkZqV7I/AAAAAAAAChk/qD2lvxm17bMVe1RXvR_pdkpIsZoHo0gegCLcB/s1600/adblock-min.png
Yang di block merah bisa di ganti gambar adblock kalian nanti.

value=10
10 : Untuk detik Adblocknya muncul

Lalu save di atas </body> di sarankan, atau bisa di pasang di Tata Letak / Widget kalian.

Selesai.
Sekian dari tutorial saya Bagaimana Cara membuat script adblock dengan tombol close. Semoga dapat bermanfaat untuk kalian semua.

Terima kasih :)
Facebook Comments