Chatwoot/app/views/widget_tests/index.html.erb
Pranav Raj S cb22b396eb
Feature: Website SDK (#653)
Add SDK functions

Co-authored-by: Sojan <sojan@pepalo.com>
2020-04-03 13:04:58 +05:30

21 lines
523 B
Text

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<script>
window.chatwootSettings = {
hideMessageBubble: false,
};
(function(d,t) {
var BASE_URL = '';
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src= BASE_URL + "/packs/js/sdk.js";
s.parentNode.insertBefore(g,s);
g.onload=function(){
window.chatwootSDK.run({
websiteToken: '<%= @web_widget.website_token %>',
baseUrl: BASE_URL
})
}
})(document,"script");
</script>