Created
May 17, 2010 20:59
-
-
Save valueof/404220 to your computer and use it in GitHub Desktop.
This function hides Disqus if thread is closed and no comments were posted.
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
| /* | |
| * This function hides Disqus if thread is closed and no comments were posted. | |
| * It is better to place this function in HEAD. | |
| * | |
| * IMPORTANT: Please note, that this example uses internal APIs that might change in future. | |
| * We will not provide any prior announcement before changing or removing any internal APIs. | |
| */ | |
| var disqus_callback = function () { | |
| if (DISQUS.jsonData.thread.closed && DISQUS.jsonData.thread.total_posts === 0) { | |
| DISQUS.nodes.container.style.display = 'none'; | |
| } | |
| }; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oops sorry, there was a typo in this gist. It is supposed to be disqus_callback, not disqus_developer.