-4

I got a script for a popunder but the popunder just opens if you click anywhere on the website. They did it like this to avoid that AdBlocks don't block the pounder. So now the question: Could anybody help me to write the script as an onload script. Simulating a click doesn't work.

Here the Script:

<script type="text/javascript">
    var _pop = _pop || [];
    _pop.push(['siteId', 348021]);
    _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>
Rory McCrossan
  • 306,214
  • 37
  • 269
  • 303
thatsnoi
  • 1
  • 1

1 Answers1

1

You can't. Browsers are not allowed to show popups in response to load events (and are smart enough to tell the difference between a real click and a simulated one)

Quentin
  • 800,325
  • 104
  • 1,079
  • 1,205