Created
August 13, 2021 01:16
-
-
Save david-wb/d76def3c1cf1d5661fe303c5966393b9 to your computer and use it in GitHub Desktop.
Handling Bavard Chat Window Events
This file contains hidden or 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
<script> | |
(function () { | |
window.onBavardUserAction = function (userAction) { | |
if (userAction.utterance === "close") { | |
window.bavard.close(); | |
} else if (userAction.utterance === "hideWidget") { | |
window.bavard.setVisibility(false); | |
} else if (userAction.utterance === "unload") { | |
window.unloadBavard(); | |
} | |
}; | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment