Sunday, January 4, 2015

anti Adblock script into your blog

 Adblockers are addons or plugins for browsers like google chrome,mozilla firefox etc. which is used to block ads on your blogs or websites when some one visits and has adblocker installed.
Now a days millions of people are aware of adblockers and it means those millions of people if visit your blog, you earn nothing ,not even a penny.

For bloggers just add html widget and copy paste this script

Step: 1
<script type="text/javascript" src="advertisement.js"></script>

<script type="text/javascript">

if (document.getElementById("tester") != undefined)

{

    document.write('<p class="yes">No <strong>AdBlock Plus</strong> detected! Thanks for truly supporting our site.</p>');

}

else

{

    document.write('<p class="no">We\'ve detected that you\'re using <strong>AdBlock Plus</strong> or some other adblocking software. Please be aware that this is only contributing to the demise of the site. We need money to operate the site, and almost all of that comes from our online advertising. To read more about why you should disable ABP, please <a href="#">click here</a>.<!-- end .content --></p>');

}

</script>

Step:2
advertisement.js contents is


document.write('<div id="tester">an advertisement</div>');


save advertisement.js file  and call it in script(use Google drove or drop box)

Step: 3
add this to your Css file

#tester {

    display:none;

}
done!

About Author

Milan Techglyphs
Milan Techglyphs

Author & Editor

Milan Antony is the founder of TGS.He is a Technology Enthusiast with a keen eye on the Cyberspace and other tech related developments.

0 comments:

Post a Comment