Anti Adblock:-
Adblockers can block the ads of your website, Using the Anti Adblock code no-one can view your website without turning off the Adblocker system.If anyone wants to access your website they should turn off the Adblocker System.Otherwise a warning will showing to turn the Adblocker off to access the website.Here I Discuss about How to add Anti Adblock in Blogger.
How to add Anti Adblock in Blogger:-
- Login on Blogger.com
- Goto Theme Section and Click on Three Dots
- Click On Edit HTML then click on the Code
- Search (Press CTRL+F) and type </head>
- After getting this, copy below code and paste it before </head>
<style type='text/css'>
/* Animation */
@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}100%{opacity:1;transform:translateY(0)}}
@keyframes rubberBand{from{transform:scale3d(1,1,1)}30%{transform:scale3d(1.25,0.75,1)}40%{transform:scale3d(0.75,1.25,1)}50%{transform:scale3d(1.15,0.85,1)}65%{transform:scale3d(.95,1.05,1)}75%{transform:scale3d(1.05,.95,1)}to{transform:scale3d(1,1,1)}}
/* Say Hi to Adblock */
#gourabblock{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}
#gourabblock .header{margin:0 0 15px 0}
#gourabblock .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;animation:rubberBand 1s}
#gourabblock button{padding:10px 20px;border:0;background:rgba(0,0,0,0.15);color:#fff;margin:20px 5px;cursor:pointer;transition:all .3s}
#gourabblock button:hover{background:rgba(0,0,0,0.35);color:#fff;outline:none}
#gourabblock button.active,#gourabblock button:hover.active{background:#fff;color:#222;outline:none}
#gourabblock .fixblock{background:#fff;text-align:left;color:#000;padding:20px;height:250px;overflow:auto;line-height:30px}
#gourabblock .fixblock div{display:none}
#gourabblock .fixblock div.active{display:block}
#gourabblock ol{margin-left:20px}
@media(max-width:768px){#gourabblock .inner{width:calc(100% - 20px);margin:10px auto;padding:15px}}
</style>
- After pasting the above code Search (Press CTRL+F) and type </body>
- After getting this, copy below code and paste it before </body>
<script type='text/javascript'>
//<![CDATA[
// Say Hi to Adblock
function downloadJSAtOnload(){var e=document.createElement("script");e.src="https://cdn.staticaly.com/gist/pyarmeindia/5a63c7d9909b48695b0c164952d27f43/raw/2e7d90aa7ef59d34219f5cae7281c998e24ecd7d/gourabblock.js",document.body.appendChild(e)}window.addEventListener?window.addEventListener("load",downloadJSAtOnload,!1):window.attachEvent?window.attachEvent("onload",downloadJSAtOnload):window.onload=downloadJSAtOnload;
//]]>
</script> - Save the Theme & View the Blog
- Done
Note:-
If anyone has installed the JS Adsense Code in a template like this
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Please delete the Code because in the Anti Adblock Script the JS Adsense Code is Embedded in it.
This post is related to-
Anti Adblock
How to add Anti Adblock in Blogger
anti adblock script for blogger
anti adblock script
0 Comments
If you have any query you can say it without any hesitation