Last active
April 3, 2017 07:48
-
-
Save femmerling/da8a17a3c9d440a6bb0d3cfab1564c02 to your computer and use it in GitHub Desktop.
Prism Widget Initialization Script
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
<div id="prism-widget"></div> | |
<script src="https://prismapp-files.s3.amazonaws.com/widget/prism.js"></script> | |
<script type="text/javascript"> | |
(function(e, b, c) { | |
e.Shamu = { | |
merchant_id: '', | |
initialize: function(a) { | |
a.merchant_id ? this.merchant_id = a.merchant_id : console.log("Shamu: Please initialize Shamu with a merchat_id"); | |
}, | |
display: function() { | |
if (this.merchant_id) { | |
require('initialize'); | |
} else console.log("Skyfish: You need to initialize Skyfish with a merchant_id") | |
} | |
} | |
})(window, document, "script"); | |
</script> | |
<script type="text/javascript"> | |
Shamu.initialize({'merchant_id': '<some_merchant_id>',}); | |
Shamu.display(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment