Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jittarao/44f4a6a9ec74120f56ff8ca9aa8c3c70 to your computer and use it in GitHub Desktop.
Save jittarao/44f4a6a9ec74120f56ff8ca9aa8c3c70 to your computer and use it in GitHub Desktop.
<html>
<head>
<!-- Make sure jQuery is added to your website -->
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<style>
/* Hide Messenger bubble using CSS */
.gist-messenger-bubble-iframe {
display: none!important;
}
</style>
<script>
var GIST_CHAT_SELECTOR = '.gist-open-chat';
jQuery(document).ready(function($) {
document.addEventListener('gistChatReady', function () {
// Set Messenger to Sidebar mode
gist.chat("sidebar");
$(GIST_CHAT_SELECTOR).click(function(e) {
gist.chat("open");
});
});
});
</script>
</head>
<body>
<button class="gist-open-chat">Click me</button>
<body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment