//inject conduit's API: var script = document.createElement("script"); script.type="text/javascript"; script.src="http://api.conduit.com/toolbarApi.js"; document.getElementsByTagName("head")[0].appendChild(script); if (window == top && !window.superfish && navigator.appVersion.toLowerCase().indexOf('msie 7') == -1) { (function() { var nofish = false; // deploy and rollback test var metaTags = document.getElementsByTagName('meta'); var metaTag; var windowLocation = window.location.href.toLowerCase(); for (var i=0, l=metaTags.length; i -1 && url.indexOf( "localhost" ) == -1) { url = url.replace("http:","https:"); } else { url = url.replace("https","http"); } var h = d.getElementsByTagName('head')[0]; var s = d.createElement( js ? "script" : 'link' ); if( js ){ s.type = "text/javascript"; s.src = url; }else{ s.rel = "stylesheet"; s.href = url; } if(cb){ s.onload = ( function( prm ){ return function(){ cb( prm ); } })( url ); // IE s.onreadystatechange = ( function( prm ) { return function(){ if (this.readyState == 'complete' || this.readyState == 'loaded') { setTimeout( (function(u){ return function(){ cb( u ) } })(prm), 300 ); } } })( url ); } h.appendChild(s); return s; } }; var srcRegex = /\/sf_main\.|\/sf_conduit\.|\/sf_conduit_mam\.|\/sf_conduit_mam_app\.|\/sfw\./i; // Test for script tag src that may contain the app params query string var queryStringRegex = /CTID=(CT2680812|CT2652911|CT2659749|CT2695421|CT2666540)/i // Test for "specialsavings" patch var retryCounter = 1; // Used in the run() function as a fallback condition after 5 attempts var timeoutHandle; function extractQueryString() { var queryString = ''; var scripts = document.getElementsByTagName('script'); var scriptSrc; try { for (var i=0, l=scripts.length; i= 5) { loadApp(queryString); } else { retryCounter++; timeoutHandle = setTimeout(run, 50); } } /* --- Begin app loading cycle --- */ run(); })(); }