Last active
May 19, 2020 15:12
-
-
Save jittarao/5df015b0289dded19e99de3acce9383c to your computer and use it in GitHub Desktop.
This file contains 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
<!-- place this script tag after the Gist tracking code --> | |
<script> | |
// open the Messenger widget when you receive a message | |
document.addEventListener('gistChatReady', function () { | |
document.addEventListener("onGistUnreadCountChange", function(e) { | |
if (window.gistUnreadCount > 0 || $('.gist-messenger-iframe').css('display') === 'block') { | |
gist.chat("showLauncher"); | |
} else { | |
gist.chat("hideLauncher"); | |
} | |
}); | |
}); | |
</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment