Created
March 21, 2012 21:21
-
-
Save dialtone/2152947 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (function () { | |
| var _onload = function(){ | |
| if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return} | |
| if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return} | |
| var scr = document.createElement("script"); | |
| var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com"); | |
| scr.setAttribute('async', 'true'); | |
| scr.type = "text/javascript"; | |
| scr.src = host + "/j/roundtrip.js"; | |
| ((document.getElementsByTagName('head') || [null])[0] || | |
| document.getElementsByTagName('script')[0].parentNode).appendChild(scr);}; | |
| if (window.addEventListener) {window.addEventListener('load', _onload, false);} | |
| else {window.attachEvent('onload', _onload)}}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think it matters but the IIFE (like yours) are written like (function(){})(); and not (function(){}());
HTH