-
-
Save dcramer/475750 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<title>Comments count code example</title> | |
</head> | |
<body> | |
<!-- For this link, we will try to fetch comments count by URL: http://example.com/article.html --> | |
<a href="http://example.com/article.html#disqus_thread">First article</a> | |
<!-- For this link, we will try to fetch comments count by identifier: article2identifier --> | |
<a href="http://example.com/article2.html#disqus_thread" | |
data-disqus-identifier="article2identifier">Second article</a> | |
<!-- We will ignore this link because its href attribute does not end on #disqus_thread --> | |
<a href="http://example.com/" data-disqus-identifier="tenthousands">Anchor</a> | |
<script type="text/javascript"> | |
// This is actual code that needs to be inserted. | |
var disqus_shortname = 'websiteshortname'; // Put your website's shortname here | |
(function () { | |
var s = document.createElement('script'); s.async = true; | |
s.type = 'text/javascript'; | |
s.src = 'http://disqus.com/forums/' + disqus_shortname + '/count.js'; | |
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); | |
}()); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment