Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
534 B
8
Indexable
Never
<script>
// setting the Tolstoy widget to display
window.tolstoyWidgetId = 'awmc69ig2znaq';

// Hide the chat widget  **
userengage('widget.hide');

// Catch button click in Tolstoy
window.addEventListener('message', function(message) {
if (message.data.name === 'tolstoyAnswerClicked' && message.data.text === 'Chat with me') {

    // show the widget ***
    window.drift.api.toggleChat();

    // hide the Tolstoy
    userengage('widget.show');
 }
 });
</script>
<script async src="https://widget.gotolstoy.com/widget.js"></script>