stopadblock logo 1stopadblock logo 2

Adblock

Adblock means that any advertisements (also called "ads") on a page are being blocked by an extension of program in the browser. This has many advantages such as: Stopping intrusive ads, reduce the loading time of your webpage or just because you hate advertisements since they are a security risk. A adblocker searches for ads on websites, so it can remove them from the source code before this page is being displayed.

Anti Adblock Script

Anti Adlock Script is the solution for the website owner that suffers from people who are using adblockers. This can cost a lot of income on a smoothly running website. To prevent this from happening, we build Anti Adblock Script. This code checks to see if there is an adblocker present in the clients browser. If this is indeed the case, a very subtle message will be displayed to this client asking this client to disable his/hers adblocker for your page. When this request has been fulfilled, the message will remain hidden on the next refresh, so this client won't be bothered with the message again.

How do I place the Anti Adblock Script code

The Anti Adblock Script code is easy and quickly placeable on your own website. The code to do this is in the code blocks beneath this text and is also downloadable as a separate file for a potential php include or to store the code for later use. You can put the HTML code on a random position through the whole body of your index.html or php. However we recommend putting this code immediately after the body tags within your index page, so all the codes are close to each other. This is in order to maintain the loading time. The jQuery code is written to be placed within the body tags, but also works when placed within the header tags. However we recommend putting this code just underneath the HTML code so all the code is close to each other. The CSS must be included within the header, either within style tags, or included from the .css file. This include or these tags cannot be placed anywhere else then within the header.

Code Blocks:

adblocker.html


<head>
<script src="https://code.jquery.com/jquery-2.1.3.js"></script>
</head>
<div class="ad_box"><h1>So if you activate the plugin this text or anything of this text, is going to be hidden...</h1></div>
<div id="EPxdU9xTuRWk" class="hoOcbG0CqpjS" style="top: 100px; opacity: 1; visibility: hidden; background: rgb(221, 221, 221);"><h1>AdBlock :-(</h1><p> </p>
<p>We have detected that you are using AdBlock Plus or some other adblocking software. We need money to operate the site, and almost all of that comes from our online advertising.</p>
<p>We would appreciate it very much if you whitelist our website in your AdBlocker.</p>
<p></p>
<p>Thank you</p></div>
<div class="hoOcbG0CqpjS-bg" style="display: none; background: rgba(0, 0, 0, 0.8);"></div>
<script type="text/javascript" src="adblock[.min].js?ver=1.6.1"></script>

adblock.js

Or download the minified version:

adblock.min.js


var advert = document.getElementsByClassName('ad_box')[0];
function isHidden(el) {
    return (el.offsetParent === null)
}
$(document).ready(function () {
    setTimeout(function () {

        var hiddenElement = isHidden(advert);

        if (hiddenElement) {
            $('.hoOcbG0CqpjS-bg').fadeIn();
            $('.hoOcbG0CqpjS').fadeIn();
            $('.hoOcbG0CqpjS').css('visibility', 'visible');
        }
        else {
            $('.hoOcbG0CqpjS-bg').fadeOut();
            $('.hoOcbG0CqpjS').fadeOut();
            $('.hoOcbG0CqpjS').css('visibility', 'hidden');
        }
    }, 1200);
});

adblockstyle.css


.hoOcbG0CqpjS-bg{
  position:fixed;
  height:100%;
  width:100%;
  background:#000;
  background:rgba(0,0,0,.8);
  z-index:99998;
  display:none;
  top:0;
  left:0
}
.hoOcbG0CqpjS{
  visibility:hidden;
  top:100px;
  left:0;
  right:0;
  margin-left:auto;
  margin-right:auto;
  position:fixed;
  max-width:520px;
  background:#eee;
  z-index:99999;
  padding:30px 40px 34px;
  -moz-border-radius:5px;
  -webkit-border-radius:5px;
  border-radius:5px;
  -moz-box-shadow:0 0 10px rgba(0,0,0,.4);
  -webkit-box-shadow:0 0 10px rgba(0,0,0,.4);
  -box-shadow:0 0 10px rgba(0,0,0,.4)
}
.hoOcbG0CqpjS
.small{
  width:200px;
  margin-left:-140px
}
.hoOcbG0CqpjS
.medium{
  width:400px;
  margin-left:-240px
}
.hoOcbG0CqpjS
.large{
  width:600px;
  margin-left:-340px
}
.hoOcbG0CqpjS
.xlarge{
  width:800px;
  margin-left:-440px
}
.hoOcbG0CqpjS
.close-hoOcbG0CqpjS{
  font-size:22px;
  line-height:.5;
  position:absolute;
  top:8px;
  right:11px;
  color:#aaa;
  text-shadow:0 -1px 1px rbga(0,0,0,.6);
  font-weight:700;
  cursor:pointer
}

@media only screen and (max-width:560px){
  .hoOcbG0CqpjS{
    max-width:90%;
    left:5%;
    right:5%
  }
}


If you need help with anything? Send us your message:

So if you activate the plugin this text or anything of this text, is going to be hidden...

후원 혜택