Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prism Widget Initialization Script
<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