Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's an example which I tested against a very common ad blocker - Firefox's <a href="https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/" rel="nofollow">Adblock Plus</a> (using the EasyList filter):</p> <p><a href="http://jsbin.com/umuqa4" rel="nofollow"><strong><em>Live Demo</em></strong></a> (<a href="http://jsbin.com/umuqa4/edit" rel="nofollow">edit</a>)</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; .innocent-class { background: url(http://www.google.com/images/logos/ps_logo2.png); width: 240px; height: 400px } .justForTesting, .advertise_ads { width: 240px; height: 400px; background: #fff } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="innocent-class"&gt; &lt;!-- just don't call it "advertContainer" :) --&gt; &lt;div class="advertise_ads justForTesting"&gt; advert here! &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>When Adblock Plus finds an element with a class (for example) <code>.advertise_ads</code>, it will hide that element.</p> <p>If it does, the "please don't block my ads!" <code>background-image</code> (in this case, the Google logo) from the parent element will be visible.</p> <p>If the advert isn't blocked, the advert will cover the replacement image.</p> <p>Try changing <code>advertise_ads</code> to something else such as <code>sdpfjsdfjp</code>, and the advert will be visible.</p> <p>I imagine this technique will also work with most other ad blockers.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload