for (i = 1; i < posts.length; i++) {
posts[i] = "<a " + "name" + posts[i];
posts[i] = posts[i].replace( /<[^<]*>/gi, " "); // kill
html tags
posts[i] = posts[i].replace( /\s+/gi, " "); // collapse
whitespace
while (posts[i].charCodeAt(0) == 32)
posts[i] = posts[i].substr(1); // trim left
while (posts[i].charCodeAt(posts[i].length -1) == 32)
posts[i] = posts[i].substr(0, posts[i].length -1); //
trim right
// first word is poster nick
var nick = posts[i].substr(0, posts[i].indexOf(" "));
// text goes after "reply to this post ", the date goes after
"posted: "
var text = posts[i].split("reply to this post ");
var pdat = text[0].split("posted: "); pdat = pdat[1]; text =
text[1];
posts[i] = { nick:nick, text:text, pdat:pdat }
// postcounts
s = ""; t = 0;
for(n in post_counts) {
s += n + ": " + post_counts[n] +
"\n";
t += post_counts[n];
}
document.getElementById("out").value = s + "\n\nTotal:
" + t;
</script>
If you save thread html and add this somewhere at the end of it,
you'll have following results:
That all was few hours ago, when my comment was
still winning :) Thread html is now over 0.5MB, people start to complain it
takes too long to load, so whoever will win has more chances. I guess it
will be cro magnus, who posts more crap than anybody.
Nerd mode OFF.
Unrelated:
posted by makc on Saturday 7th October 2006, 14:58:52