Created
May 1, 2012 21:08
-
-
Save alcides/2571419 to your computer and use it in GitHub Desktop.
Blogspot add comment sequential id.
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 addcomments = function() { | |
var ls = document.getElementsByClassName("comment"); | |
for (i=0;i<ls.length;i++) { | |
if (ls[i].innerHTML.indexOf('comment_count') == -1) | |
ls[i].innerHTML = "<div class='comment_count' style='float:right; font-weight: bold;'>#" + (i+1) + "</div>" + ls[i].innerHTML; | |
} | |
var links = document.getElementsByClassName("loadmore"); | |
for (i=0;i<links.length;i++) { | |
links[i].children[0].onclick = function(e) { delay_addcomments(); }; | |
} | |
} | |
var delay_addcomments = function() { | |
setTimeout("addcomments();",3000); | |
} | |
addcomments(); | |
// ]]> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment