simoneromanelli
1/11/2012 - 2:33 PM

Errorception's async loader

Errorception's async loader

<script>
    // <snip>
    (function (window, document) {
        var loader = function () {
            var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0];
            script.src = "http://errorception.com/projects/" + _errs[0] + "/beacon.js";
            tag.parentNode.insertBefore(script, tag);
        };

        // Wait until window.onload before downloading any more code.
        window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
    })(window, document);
</script>