Webmaster... Check if an adblocking extensions is installed and...

Discussion of topics related to ad blocking.
Locked
User avatar
smed79
Liste AR/FR Author
Liste AR/FR Author
Posts: 15839
Joined: Sun Jan 17, 2010 4:00 am
Location: EasyList Forum

Webmaster... Check if an adblocking extensions is installed and...

Post by smed79 »

Hi,

Do you have a blog, site, forum and your ou want to help your users? Here CSS/Javascript/HTML code to check if an adblocking extensions is installed ... If Not suggest to install Adblock Plus https://adblockplus.org/.

CSS

Code: Select all

<style>
.abp-box { font-family: "Source Sans Pro", sans-serif;width:360px; padding:10px 15px 10px 35px; margin:5px; color:#555; font-size:11px; top:15px; right:15px; z-index:1000; position:fixed; border-radius:10px; border:1px solid #f5aca6;}
.abp-box:hover{border:1px solid #f00;}
.abp-msg { background:#ffecec url('http://i.imgur.com/n5DKdKZ.png') no-repeat 10px 50%; }
</style>
Javascript

Code: Select all

<script type="text/javascript">
    function PopUp(hideOrshow) {
    if (hideOrshow == 'hide') document.getElementById('ac-wrapper').style.display = "none";
    else document.getElementById('ac-wrapper').removeAttribute('style');
}
window.onload = function () {
    setTimeout(function () {
        PopUp('show');
    }, 10000);
}
</script>
HTML

Code: Select all

<div id="ac-wrapper" style="display:none">
<div class="abp-box abp-msg GoogleAd">Installer <a href="https://adblockplus.org/" title="Installer Adblock Plus" target="_blank"><b>Adblock Plus</b></a> to surf the web without annoying ads! Can blocks banners, pop-ups, tracking, malware and more...</div>
</div>
Result
Image

PS: The javascript code is needed to show up the message 10 seconds after loading the page.
•► Read RULES / Use forum Search
••► Don't post clickable links
•••►Upload screenshots at imgbb.com
Moved from Computer Topics to Ad Blocking News on Tue Oct 31, 2017 9:13 pm by LanikSJ

Locked