Last active
August 29, 2015 13:57
-
-
Save thenickcox/9508784 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
<body class="app"> | |
<div class="stripeInitialSpinner" id="stripeSpinner"></div> | |
<div class="stripeErrorMessage" id="stripeLoadError"> | |
<p>Sorry, there was a problem loading Checkout. If this persists, please <a href="/mailto:[email protected]/">email [email protected]</a> | |
</p> | |
</div> | |
<script type="text/javascript"> | |
(function () { | |
var hideSpinner = function () { | |
var spinner = document.getElementById('stripeSpinner'); | |
if (spinner) { | |
spinner.className += ' animated'; | |
setTimeout(function () { | |
spinner.className += ' hidden'; | |
setTimeout(function () { | |
document.body.removeChild(spinner); | |
}, 300); | |
}, 1); | |
} | |
} | |
var showError = function () { | |
hideSpinner(); | |
document.getElementById('stripeLoadError').style.display = 'block'; | |
}; | |
var initApp = function () { | |
var App = StripeCheckout.require('desktop/controllers/app'); | |
var helpers = StripeCheckout.require('lib/helpers'); | |
window.app = new App({ | |
el: document.body, | |
onOpen: function () { | |
var spinner = document.getElementById('stripeSpinner'); | |
if (spinner) spinner.style.display = 'block'; | |
}, | |
onLoad: function () { | |
hideSpinner(); | |
}, | |
onError: function () { | |
showError(); | |
} | |
}); | |
}; | |
var head = (document.getElementsByTagName('head')[0] || document.documentElement); | |
var insert = function (el) { | |
head.insertBefore(el, head.firstChild); | |
}; | |
var cssTag = document.createElement('link'); | |
cssTag.rel = 'stylesheet'; | |
cssTag.href = '/v3/checkout/desktop.css?version=HL-W7dCq0eMhKSEH8kkGKQ'; | |
insert(cssTag); | |
var loadScript = function (src, load, err) { | |
var scriptTag = document.createElement('script'); | |
scriptTag.src = src; | |
if (typeof load === 'function') { | |
//From http://stackoverflow.com/questions/6568890 | |
var done; | |
scriptTag.onload = scriptTag.onreadystatechange = function () { | |
if (!done & amp; & amp; | |
(!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) { | |
done = true; // Give the script a chance to execute on IE | |
// Otherwise the Stripe.endpoint global gets clobbered | |
// and possibly other bad things happen | |
setTimeout(load, 0); // Handle memory leak in IE | |
scriptTag.onload = scriptTag.onreadystatechange = null; | |
} | |
}; | |
} | |
if (typeof err === 'function') { | |
scriptTag.onerror = err; | |
} | |
insert(scriptTag); | |
}; | |
loadScript("/js/raven.min.js?version=l0KqNMHa_QhUOamdDvGk-A", function () { | |
var options = { | |
ignoreErrors: [/Error connecting to extension hkcaohgalm/, ] | |
}; | |
Raven.config('https://[email protected]/11').install(); | |
}); | |
var loadedToInit = 0; | |
loadScript('/v3/checkout/desktop.js?version=2nidrl_uZ8axRMyU1UTQgQ', function () { | |
loadedToInit += 1; | |
if (loadedToInit == 2) | |
initApp(); | |
}, function () { | |
showError(); | |
}); | |
loadScript('https://js.stripe.com/v1/', function () { | |
loadedToInit += 1; | |
if (loadedToInit == 2) initApp(); | |
}); | |
loadScript('https://mpsnare.iesnare.com/snare.js'); | |
})(); | |
</script> | |
<script type="text/javascript"> | |
var io_install_stm = false; // do not install Active X | |
var io_exclude_stm = 12; // do not run Active X | |
var io_install_flash = false; // do not install Flash | |
var io_enable_rip = true; // enable detection of Real IP | |
</script> | |
<div class="preloader"></div><span style="position:" top:=""><object width="1" height="1" align="right" | |
id="stmgwb2" classid= | |
"/clsid:d27cdb6e-ae6d-11cf-96b8-444553540000/"> | |
<param value="always" name="allowScriptAccess" /> | |
<param value="https://mpsnare.iesnare.com/stmgwb2.swf" name= | |
"movie" /> | |
<param value="true" name="swLiveConnect" /> | |
<embed width="1" height="1" pluginspage= | |
"http://www.macromedia.com/go/getflashplayer" type= | |
"application/x-shockwave-flash" allowscriptaccess= | |
"always" swliveconnect="true" name= | |
"stmgwb2" src= | |
"/https://mpsnare.iesnare.com/stmgwb2.swf/" /> | |
</object></span>" | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment