Disable Adblock Warning Message On Blogger

Disable Adblock Warning Message On Blogger

We all know very well that disable Adblock warning message on blogger very important for ads. These ads show on my blogs and users click on ads and we earn money so we told you how to show warning disable Adblock warning message on blogger.

Disable Adblock Warning Message On Blogger

If your blog has nice traffic and you’ve placed advertisements on your blog so that you can earn from your blog then you need to add this script to your blog as nowadays most of the people are using AdBlock extension on their browser to block advertisements on websites and blogs.

Also Read: The Need for Custom Domain in Blogger Explained

What is Adblock?

Adblock is AN extension for browsers that disable the ads on websites to extend loading speed and to indicate the real content of the website. They merely block the script of ads so they cannot seem and work.

Many people are using this extension and you can see that by the number of downloads. Recently, Adblockwebsitee aforesaid that their extension is getting used by over fifty million folks worldwide.

That’s a huge number and I think it will somehow affect your blog too. Well, you’re working hard on your blog because you want to earn from your blog so you must work on this point also.

Also Read: How To Setup Custom Domain In Blogger

What will this code do?

This code will show a warning message to every visitor who has Adblock extension in their browser. They wouldn’t be able to access your blog until they disable their Adblock extension.

They will see a warning message like this:-

Disable Adblock Warning Message On Blogger

Until they disable their Adblock they wouldn’t be able to see the content of your blog and once they disable the Adblock they will be able to see all the content normally.

Note:- Please don’t use this script if you don’t have any ads on your blog. There is no need to add this script if you don’t have any ads added to your blog.

Steps to follow:

  • Open blogger
  • Go to ‘Layout’ and click on ‘Add a gadget’
  • Paste this code in that gadget and click on ‘Save’

Click To Copy Code

<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><span class="boldwarn">Adblock detected!</span><br/>To continue reading, please disable adblock for our blog. <br/>Ads are necessary to keep the blog free for all. 🙂 </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>
  • Now, go to ‘Template’ and select ‘Customise’
  • Under ‘Advanced’ tab click on ‘Add CSS’
  • Paste this code into the box and click on ‘Apply to Blog’

Click To Copy Code

#g207{z-index:999999;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{ color:#000;opacity:1;filter:none;font:bold 25px Verdana,Arial,sans-serif;text-align:center;margin:20% 0}#g207 p a,#g207 p i{font-size:12px}#g207 ~ *{display:none}
.boldwarn {font-size: 40px; color:red; font-family: century gothic,Arial,sans-serif;}

You have successfully added no Adblock extension script in your blog and now you can visit your blog to see if it’s working or not.

Question?

First, see if you have an Adblock extension on your blog or not. This script is useless in absence of Adblock. So if you don’t have Adblock then add Adblock first in your browser then check.

Add a Comment

Your email address will not be published. Required fields are marked *

eight + 17 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.