Mc Tech Solutions

Detected Ad-Blocker

Please Turn off your adblocker to access Mc Tech Solutions.

Mc Tech Solutions
Join Us On Telegram To Get Latest Updates. Join now!

How to Install Anti Adblocker Script on Blogger - Mc Tech Solutions

 How to Install Anti Adblocker Script on Blogger

Hi Guys, Welcome to Mc Digitals. In this post, I will direct you bit by bit on How to Install Anti Adblocker in Blogger. Along these lines, follow the simple advances and look into how to introduce hostile to adblocker in Blogger. 

What is an Adblocker? 

An Adblocker is a product or program augmentation that obstructs the presence of notices on a site or application. 

Individuals use promotion blockers since they feel that advertisements delayed down their programs, giving a helpless client experience. Likewise a few group discover online advertisements unessential, obtrusive, and irritating. 

What Adblocker Means for Your Income? 

Assuming a client utilizes adblocker in his program and application, every one of the promotions are obstructed and no advertisement will be noticeable to him so that no snap and impression will come from that client going to your site. Without promotion snaps and impressions, you won't acquire your pay. 

To keep away from this misfortune, numerous sites utilize Anti-Adblocker, so that assuming a client has empowered Adblocker, he can not peruse anything on your site, solely after impairing Adblocker, he will actually want to peruse from your site. 

Note: Anti Adblocker will appear only if you have enable Adblocker in your browser.

Steps to Install Anti Adblocker

To install Anti Adblocker in your blog, you have to add some css and javascript codes. We have explained very well below how to add these codes. Follow the steps carefully and install anti adblokcer.

Step 1. Adding CSS Codes

Search for the code ]]></b:skin> on your template and paste the following CSS Codes above it.

/* Anti AdBlock */
@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}
@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}
#Adblock::-webkit-scrollbar{-webkit-appearance:none;width:4px;height:5px}
#Adblock::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.15);border-radius:10px}
#Adblock::-webkit-scrollbar-track{background-color:transparent}
#Adblock::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.25)}
#Adblock{background:rgba(34,47,62,0.67);position:fixed;margin:auto;left:0;right:0;top:0;bottom:0;overflow:auto;z-index:999999;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
#Adblock .header{margin:10px 0 20px 0;position:relative;top:initial;left:initial}
#Adblock .header h2{color:#222;font-size:1.8rem}
#Adblock .inner{background:#fff;border-radius:12px;color:#222;box-shadow:0 0 2rem -1rem rgba(0,0,0,0.5);text-align:center;width:100%;max-width:640px;padding:30px;margin:7% auto 2% auto;animation:flipInX 1s}
#Adblock button{position:relative;overflow:hidden;padding:6px 20px;background:#f5aa33;color:#fff;margin:20px 5px;cursor:pointer;border-radius:99em;font-size:13px;font-weight:500;border:2px solid #f5aa33;transition:initial;box-shadow:0 1px 0 rgba(0,0,0,0.01),0 5px 10px rgba(0,0,0,0.1)}
#Adblock button:hover{background:#fff;color:#f5aa33;outline:none;border-color:#f5aa33}
#Adblock button.active,#Adblock button:hover.active{background:#ee5253;color:#fff;border-color:#ee5253;outline:none}
#Adblock .fixblock{background:#f7f9f8;text-align:left;color:#000;padding:20px;height:250px;overflow:auto;line-height:30px;border-radius:8px;border:1px solid rgba(0,0,0,0.05)}
#Adblock .fixblock div{display:none}
#Adblock .fixblock div.active{display:block;animation:fadeInUp .5s}
#Adblock ol{margin-left:20px}
#Adblock button:after,#Adblock button:before{content:'';display:block;position:absolute;bottom:0;right:0;left:0;height:50%;background:rgba(0,0,0,0.05);background-repeat:no-repeat;transition:all .3s}
#Adblock button:before{height:0;top:0;bottom:initial}
#Adblock button:hover:after{height:0}
#Adblock button:hover:before{height:50%}
@media(max-width:768px){#Adblock .inner{width:calc(100% - 20px);margin:10px auto;padding:15px}}

Step 2. Adding JavaScript Codes

There are two JavaScript Code options that you can use, namely Standard JavaScript and Lazy Load JavaScript. The advantage of Lazy Load JavaScript is that it doesn't affect to PageSpeed Insight Score.

Paste the JavaScript of your choice above the </body> tag.

1. Standard JavaScript
<script>
//<![CDATA[
// Anti Adblock
function downloadJSAtOnload(){var e=document.createElement("script");e.src="https://cdn.jsdelivr.net/gh/choipanwendy/adsBlock@main/adblock.js",document.body.appendChild(e)}window.addEventListener?window.addEventListener("load",downloadJSAtOnload,!1):window.attachEvent?window.attachEvent("onload",downloadJSAtOnload):window.onload=downloadJSAtOnload;
//]]>
</script>
2. Lazy Load JavaScript
<script>
//<![CDATA[
// Anti Adblock LazyLoad
var lazyadsense=!1;window.addEventListener("scroll",function(){(0!=document.documentElement.scrollTop&&!1===lazyadsense||0!=document.body.scrollTop&&!1===lazyadsense)&&(!function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://cdn.jsdelivr.net/gh/choipanwendy/adsBlock@main/adblock.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyadsense=!0)},!0);
//]]>
</script>

If your code does not work or you’ve faced any error/problem then please download the source code files from the given download button.

Thanks For Visiting Visit Again

إرسال تعليق

Copyrights © Mc Tech Solutions. All Rights Reserved. Distributed by Mc Tech Solutions