Kamis, 03 November 2016

Script Anti AdBlock

Description: Script Anti AdBlock
Rating: 4.5
Reviewer: Dugagc
ItemReviewed: Script Anti AdBlock

Script Anti AdBlock, ini bukan bypass adblock, cara kerjanya memaksa visitor mematikan plugin adblock, AdBlock ataupun Adblock Plus.


Trik Mengamankan Kode Adsense 2016 Terbaru

Sangat berguna bagi pemain adsense, karena jika pengunjung menggunakan plugin ini maka iklan di blog anda tidak akan muncul, tentunya pendapatan iklan menurun.

CSS

Copy code css, paste antara <head></head>
<style type='text/css'>
/* CSS Ad block */
#kc56{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#fff;opacity:.98;display:block;z-index:9999;overflow:hidden}
#kc56 p{color:#000;text-align:center;margin:15% auto;font-size:2rem;max-width:750px;display:table;line-height:1.5;}
#kc56 p:before{content:'\f023';font-family:fontawesome;background:#ff675c;color:#fff;text-align:center;display:block;padding:0;width:2em;height:2em;line-height:2em;font-size:2.5rem;clear:both;border-radius:100%;margin:0 auto 3%;font-weight:normal;box-shadow:inset 0 0 5px rgba(0,0,0,.1)}
#kc56 p:hover:before{content:'\f13e'}
#kc56 p a,#kc56 p i{font-size:12px}
#kc56 ~ *{display:none}
</style>

Javascript

Letakkan script ini di atas </body>
<noscript><div id='kc56' oncontextmenu='return false;'><p>Please enable JavaScript!<br/>Harap aktifkan JavaScript!</p></div></noscript>
<script type='text/javascript'>
//<![CDATA[
// Adblock
var mql = window.matchMedia('screen and (min-width: 60em)');if (mql.matches){
(function(w,u){var d=w.document,z=typeof u;function kc56(){function c(c,i){var e=d.createElement('div'),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('kc56')){c('<p><b class="text-danger">ENG :</b> Please disable your ad blocker to access this site!<br/><b class="text-danger">IND :</b> Harap nonaktifkan Ad blocker Anda untuk mengakses situs ini!</p>','kc56')}};(function(){var a=['ad_300x250_m_c','hp-store-ad','inner-top-ads','mod_ad','ps-vertical-ads','row2AdContainer','systemad_background','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;setTimeout(function(){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])}}},250)}());(function(){var t=g(0,'img'),a=['/adcde.js','/admez/ad','/adsales/ad','/adsenceSearch.','/adtools2.','/adv2.','/partner_ads_','/rcolads1.','_ads.html','.468x60-'],i;if(typeof t[0]!=z&&typeof t[0].src!=z){i=new Image();i.onload=function(){this.onload=z;this.onerror=function(){f(this.src)};this.src=t[0].src+'#'+a.join('')};i.src=t[0].src}}());(function(){var o={'http://pagead2.googlesyndication.com/pagead/show_ads.js':'google_ad_client','http://js.adscale.de/getads.js':'adscale_slot_id','http://get.mirando.de/mirando.js':'adPlaceId'},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]===u){f(n.src)}},2000);break}}}())}if(d.addEventListener){w.addEventListener('load',kc56,false)}else{w.attachEvent('onload',kc56)}})(window);};
//]]>
</script>

Saya lebih suka kalau adblocknya di aktifkan di halaman tertentu saja, misalnya halaman posting/artikel, tambahkan script ini pada javascript diatas
<b:if cond='data:blog.pageType == "item"'> Javascript/CSS/dll </b:if>
sehingga kodenya seperti ini:

Adblock halaman posting

<!--hanya halaman artikel -->
<b:if cond='data:blog.pageType == "item"'> 
<noscript><div id='kc56' oncontextmenu='return false;'><p>Please enable JavaScript!<br/>Harap aktifkan JavaScript!</p></div></noscript>
<script type='text/javascript'>
//<![CDATA[
// Adblock
var mql = window.matchMedia('screen and (min-width: 60em)');if (mql.matches){
(function(w,u){var d=w.document,z=typeof u;function kc56(){function c(c,i){var e=d.createElement('div'),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('kc56')){c('<p><b class="text-danger">ENG :</b> Please disable your ad blocker to access this site!<br/><b class="text-danger">IND :</b> Harap nonaktifkan Ad blocker Anda untuk mengakses situs ini!</p>','kc56')}};(function(){var a=['ad_300x250_m_c','hp-store-ad','inner-top-ads','mod_ad','ps-vertical-ads','row2AdContainer','systemad_background','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;setTimeout(function(){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])}}},250)}());(function(){var t=g(0,'img'),a=['/adcde.js','/admez/ad','/adsales/ad','/adsenceSearch.','/adtools2.','/adv2.','/partner_ads_','/rcolads1.','_ads.html','.468x60-'],i;if(typeof t[0]!=z&&typeof t[0].src!=z){i=new Image();i.onload=function(){this.onload=z;this.onerror=function(){f(this.src)};this.src=t[0].src+'#'+a.join('')};i.src=t[0].src}}());(function(){var o={'http://pagead2.googlesyndication.com/pagead/show_ads.js':'google_ad_client','http://js.adscale.de/getads.js':'adscale_slot_id','http://get.mirando.de/mirando.js':'adPlaceId'},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]===u){f(n.src)}},2000);break}}}())}if(d.addEventListener){w.addEventListener('load',kc56,false)}else{w.attachEvent('onload',kc56)}})(window);};
//]]>
</script>
</b:if> 


Untuk halaman lain, bisa gunakan syntax blogger untuk halaman tertentu berikut:

<b:if cond='data:blog.pageType == "archive"'>
  <!--archive_Page-->
</b:if>

<b:if cond='data:blog.pageType == "error_page"'>
  <!-- all error pages-->
</b:if>

<b:if cond='data:blog.pageType == "index"'>
  <!-- all index pages -->
</b:if>

<b:if cond='data:blog.url == data:blog.homepageUrl'> 
  <!-- only homepage -->
</b:if>

<b:if cond='data:blog.pageType == "item"'>
  <!-- all item pages -->
</b:if>

<b:if cond='data:blog.url == data:blog.canonicalHomepageUrl + "2016/11/script-anti-adblock.html"'> 
  <!-- a item page from November -->
</b:if>

<b:if cond='data:blog.searchLabel'>
  <!-- all label pages -->
</b:if>

<b:if cond='data:blog.searchLabel == "agc"'>
  <!-- for label 'agc' -->
</b:if>

<b:if cond='data:blog.searchQuery'>
    <!-- all search pages -->
</b:if>

<b:if cond='data:blog.searchQuery == "foo"'>
  <!-- for query 'foo' -->
</b:if>

<b:if cond='data:blog.pageType == "static_page"'>
  <!-- all static pages -->
</b:if>

<b:if cond='data:blog.url == data:blog.canonicalHomepageUrl + "p/pre-code-parser.html"'> 
  <!-- a specific static page with name 'foo' -->
</b:if>

Untuk lebih lanjut bisa menggunakan pengandaian conditional tag blogger selengkapnya

Skrip di atas adalah untuk blogger, namun juga bisa di gunakan untuk wordpress, intinya ada di css untuk tampilan, dan javascript untuk mendeteksi adblock plugin

Share on Facebook
Share on Twitter
Share on Google+
Notification ! {New!}
Beberapa artikel di blog ini terkadang berisi informasi dari berbagai macam sumber. Hak cipta berupa gambar, teks, dan link sepenuhnya dimiliki oleh web tersebut.
Tags :

Related : Script Anti AdBlock

Ayo sob di komen, kalau ada salah atau saran, kritik boleh coret coret dibawah, gratis kok!