Skip to content

Instantly share code, notes, and snippets.

@edtjones
Created May 8, 2015 09:07
Show Gist options
  • Save edtjones/b90081b997e76384713a to your computer and use it in GitHub Desktop.
Save edtjones/b90081b997e76384713a to your computer and use it in GitHub Desktop.
<script type="text/javascript">
// set up your
SortingOfficeConfig = {
onError: function(message) {
console.log(message);
},
onSuccess: function(data) {
console.log(data);
},
onLoading: function(data) {
console.log(data);
}
};
(function() {
var oa = document.createElement('script');
oa.src = 'https://21ae14e6.ngrok.com/embed.js';
oa.type = 'text/javascript';
oa.async = 'true';
oa.onload = oa.onreadystatechange = function() {
var rs = this.readyState;
if (rs && rs != 'complete' && rs != 'loaded') return;
try { OpenAddresses.SortingOffice.embed(SortingOfficeConfig); } catch (e) {}
};
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(oa, s);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment