Created
January 11, 2012 14:33
-
-
Save rakeshpai/1594924 to your computer and use it in GitHub Desktop.
Errorception's async loader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment