Here's a simple solution for the problem stated in this thread:
Add a data-attribute to each post in a thread with the username of the author of the post, like this:
<ul id="posts" class="posts">
<li data-user="TommyCarlier">
…
</li>
…
</ul>