Kode AdBlock Terbaru untuk Blogger dan Cara Memasangnya
CB Blogger | December 31, 2018
Kode AdBlock Terbaru untuk Blogger dan Cara Memasangnya. Kode berikut ini memunculkan notifikasi bagi pengunjung agar mendisable atau menonaktifkan ekstensi AdBlocker di komputer atau HP-nya agar iklan Google AdSense kita tampil.
Kode Anti AdBlock #1
CSS:
Pasang di atas kode ]]></b:skin>
#levelmaxblock{background:rgba(0,0,0,0.65);position:fixed;margin:auto;left:0;right:0;top:0;bottom:0;overflow:auto;z-index:999999;animation:fadeInDown 1s}
#levelmaxblock .header{margin:0 0 15px 0}
#levelmaxblock .inner{background:#e3482d;color:#fff;box-shadow:0 5px 20px rgba(0,0,0,0.1);text-align:center;width:600px;padding:40px;border-radius:5px;margin:7% auto 2% auto}
#levelmaxblock button{padding:10px 20px;border:0;background:rgba(0,0,0,0.15);color:#fff;margin:20px 5px;cursor:pointer;transition:all .3s}
#levelmaxblock button:hover{background:rgba(0,0,0,0.35);color:#fff;outline:none}
#levelmaxblock button.active,#levelmaxblock button:hover.active{background:#fff;color:#222;outline:none}
#levelmaxblock .caranya{background:#fff;text-align:left;color:#000;padding:20px;height:250px;overflow:auto;line-height:30px}
#levelmaxblock .caranya div{display:none}
#levelmaxblock .caranya div.active{display:block;animation:fadeInUp .5s}
#levelmaxblock ol{margin-left:20px}
@media(max-width:680px){#levelmaxblock .inner{width:calc(100% - 80px);margin:auto}}
@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px);-ms-transform:translateY(20px);transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}
@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px);-ms-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}
Kode JS
Simpan di atas </head>
<script src='https://cdn.rawgit.com/Indzign/InSEO/39bc7f20/levelmaxblock.js' type='text/javascript'/>
Kode Anti AdBlock #2
Ini kode anti-anblocker lama. Tampilannya menutupi halaman dan konten secara full.
1. Layout > Add a Gadget > HTML/JavaScript
2. Judul widget Kosongan
3. Copas kode ini:
<style>#g207{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:#fff;opacity:0.9;filter:alpha(opacity=90);display:block}#g207 p{opacity:1;filter:none;font:bold 16px Verdana,Arial,sans-serif;text-align:center;margin:20% 0}#g207 p a,#g207 p i{font-size:12px}#g207 ~ *{display:none}</style><noscript><i id=g207><p>Please enable JavaScript!<br />Bitte aktiviere JavaScript!<br />S'il vous plaît activer JavaScript!<br />Por favor,activa el JavaScript!<br /><a href="http://antiblock.org/">antiblock.org</a></p></i></noscript><script>(function(w,u){var d=w.document,z=typeof u;function g207(){function c(c,i){var e=d.createElement('i'),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('g207')){c('<p>Please disable your ad blocker!<br/><br/>Situs ini didukung oleh Periklanan<br/>Mohon untuk menonaktifkan Adblocker pada brower anda!!! </p>','g207')}};(function(){var a=['Adrectangle','PageLeaderAd','ad-column','advertising2','divAdBox','mochila-column-right-ad-300x250-1','searchAdSenseBox','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 t=g(0,'img'),a=['/adaffiliate_','/adops/ad','/adsales/ad','/adsby.','/adtest.','/ajax/ads/ad','/controller/ads/ad','/pageads/ad','/weather/ads/ad','-728x90-'],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]!==null){f(n.src)}},2000);break}}}())}if(d.addEventListener){w.addEventListener('load',g207,false)}else{w.attachEvent('onload',g207)}})(window);</script>
4. Save!
Kode Anti AdBlock #3
Kode CSS
Copas kode berikut ini tepat diatas kode </head>
<style>
#blockedmessagewrapper {position: fixed;width: 100%;height: 100%;left: 0;top: 0;display: flex;z-index: 100000;visibility: hidden;align-items: center;justify-content: center;-webkit-perspective: 1000px;perspective: 1000px;}
#blockedmessagewrapper:after{content: '';position: fixed;width: 100%;height: 100%;left: 0;top: 0;z-index: -1;background: rgba(0,0,0,.7);}
#blockedmessageinner{width: 90%; /* width and max width settings */max-width: 450px;padding: 20px;z-index: 100000;overflow: hidden;background: white;-webkit-transform-origin: 50% 0;transform-origin: 50% 0;}
#blockedmessageinner .title{text-transform: uppercase;color: #E20000;font-size: 2em;margin-bottom: 6px;display: block;}
#blockedmessageinner > div{border-left: 6px solid #E20000;padding-left: 10px;line-height: 2;}
#blockedmessageinner #dismissmsg2{float: right;margin-top: 15px;margin-right: 5px;cursor: pointer;text-transform: uppercase;color:#E20000;background: #eee;border-radius: 8px;padding: 3px 5px;box-shadow: 0 0 3px gray;font-size: 14px;}
#blockedmessagewrapper.showmsg{visibility: visible;}
#blockedmessagewrapper.showmsg #blockedmessageinner{-webkit-animation: swing forwards 2s;-moz-animation: swing forwards 2s;animation: swing forwards 2s;}
@-webkit-keyframes swing{
0%{-webkit-transform:rotate(0deg);}
20%{-webkit-transform:rotate(-15deg)}
40%{-webkit-transform:rotate(10deg)}
60%{-webkit-transform:rotate(-7deg)}
80%{-webkit-transform:rotate(5deg)}
100%{-webkit-transform:rotate(0deg)}}
@keyframes swing{
0%{transform:rotate(0deg)}
20%{transform:rotate(-15deg)}
40%{transform:rotate(10deg)}
60%{transform:rotate(-7deg)}
80%{transform:rotate(5deg)}
100%{transform:rotate(0deg)}}
</style>
<script>
//<![CDATA[
;(function(){
// Aggressive Adblock Notifier
var debug = true // set debug to true to always invoke adblockaction() and add class of adblocked to root element regardless of whether Adblock is enabled, for ease of styling and debugging. Set to false on production page
// Main Adblock Detect function
// When Ad Blocker detected
// Adds "adblocked" CSS class to HTML root element
// Calls function adblockaction()
var targetclass = 'adsbox' // CSS class that should trigger most ad blockers when found
document.addEventListener('DOMContentLoaded', function(){
var testunit = document.createElement('div');
testunit.innerHTML = ' ';
testunit.className = targetclass;
document.body.appendChild(testunit);
setTimeout(function() {
if (testunit.offsetHeight === 0 || debug) {
if (typeof adblockaction == 'function'){
adblockaction()
}
document.documentElement.classList.add('adblocked');
}
testunit.remove();
}, 400);
})
// adblockaction function that gets called when Adblock is enabled:
function adblockaction(){
var msg = document.getElementById('blockedmessagewrapper');
var dismiss = document.getElementById('dismissmsg2');
msg.classList.add('showmsg');
dismiss.addEventListener('click', function(){
msg.classList.remove('showmsg');
document.documentElement.classList.remove('adblocked');
})
}
})();
//]]>
</script>
Kode HTML
Simpan di atas kode </body>
<div id="blockedmessagewrapper">
<div id="blockedmessageinner">
<b class="title">Oh oh, Ad Block Alert!</b>
<div>It looks like you've enabled <b>Ad Blocking</b> on our site. Please enable ads on this site to continue, as Dynamic Drive relies solely on ads to keep producing and offering free content to you.
<b id="dismissmsg2">Dismiss</b>
</div>
</div>
</div>
Catatan: Kata-kata yang warna merah bisa diubah atau diganti.
Demikian Kode AdBlock Terbaru untuk Blogger dan Cara Memasangnya.
Previous
« Prev Post
« Prev Post
Next
Next Post »
Next Post »
0 komentar on Kode AdBlock Terbaru untuk Blogger dan Cara Memasangnya
Post a Comment