Created
May 26, 2010 18:12
-
-
Save benvinegar/414837 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
<script type="text/javascript"> | |
//<![CDATA[ | |
var get_disqus_num_replies = function() { | |
var links = document.getElementsByTagName('a'); | |
var query = '?'; | |
for(var i = 0; i < links.length; i++) { | |
if(links[i].href.indexOf('#disqus_thread') >= 0) { | |
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&'; | |
} | |
} | |
var s = document.createElement('script'); | |
s.type='text/javascript'; | |
s.src = 'http://marcador.disqus.com/get_num_replies.js' + query; | |
var body = document.getElementsByTagName('body')[0]; | |
body.appendChild(s); | |
}; | |
get_disqus_num_replies(); | |
//]]> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not just calls:
or count on server side using:
https://github.com/disqus/DISQUS-API-Recipes/blob/master/php/get-thread-details.php