Search code examples
javascriptpopupwindow

Popup without user action?


How is this site triggering its popup while bypassing Chrome's pop-up blocker?

http://undertexter.se/

I thought pop-up blockers only allowed window.open if it was triggered by a user action but that's not the case here so how are they doing it?


Solution

  • Tested on my own server, This opens up http://google.com in a new (standalone) window in Chromium 28 on Ubuntu 12.04. Adblock is active.

    <script type="text/javascript">
    document.addEventListener('click', function() {
        window.open('http://google.com','...','width=1080 height=640')
    })
    </script>