-42

I recently noticed my ad networks popunder code is getting blocked by adblock. Is there any software or technique you guys know that can counter this? I am running an adult site by the way.

Here is the popunder code if you need it:

    <!-- PopAds.net Popunder Code for www.example.com -->
<script type="text/javascript">
  var _pop = _pop || [];
  _pop.push(['siteId', 518347]);
  _pop.push(['minBid', 0]);
  _pop.push(['popundersPerIP', 0]);
  _pop.push(['delayBetween', 0]);
  _pop.push(['default', false]);
  _pop.push(['defaultPerDay', 0]);
  _pop.push(['topmostLayer', false]);
  (function() {
    var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;
    var s = document.getElementsByTagName('script')[0]; 
    pa.src = '//c1.popads.net/pop.js';
    pa.onerror = function() {
      var sa = document.createElement('script'); sa.type = 'text/javascript'; sa.async = true;
      sa.src = '//c2.popads.net/pop.js';
      s.parentNode.insertBefore(sa, s);
    };
    s.parentNode.insertBefore(pa, s);
  })();
</script>
<!-- PopAds.net Popunder Code End -->

Any help would be appreciated.

Adan G.
  • 25
  • 1
  • 3
  • 1
    An adblocker is something that generally runs on the browser as an addon, not as a script, so you can't address it with a script. – Etheryte Jan 12 '15 at 01:34
  • 8
    Write emails to them and see if you have strong enough reasons to get a green passage from them. Good luck. – Leo Jan 12 '15 at 01:57
  • 3
    People should downvote questions if they're low-quality, not if they're "impossible" or "a bad idea." – clickbait Jul 01 '18 at 16:31
  • An "adblocker" can also be an appliance. Many just block the URL's and IP' adresses. The average Josephine can do this on their SOHO router. – mckenzm Feb 16 '21 at 18:10

1 Answers1

3

encode your javascript to Base64 or bytes , then use the decode to the text ,insert the javascript text to the html, no by the urls, windows or, iframe. May be this would be work , try this.

Feng Lin
  • 670
  • 4
  • 8
  • what do you mean. I encoded my code at base64encode.org what next? – Adan G. Jan 12 '15 at 01:47
  • the js content : c1.popads.net/pop.js. parse the content to base64 or bytes. do not use the src attribute in your script tag. just include your script all in the file. – Feng Lin Jan 12 '15 at 01:52
  • should I just encode //c1.popads.net/pop.js is this what you mean or everthing following it ? – Adan G. Jan 12 '15 at 02:12
  • the file content, not the url . I mean you use the file content, not the src method to load your javascript. – Feng Lin Jan 12 '15 at 02:17