Add click handler to new posts and replies only once.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Nov 2010 13:21:32 +0000 (14:21 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 26 Nov 2010 13:21:32 +0000 (14:21 +0100)
src/main/resources/static/javascript/sone.js

index c02e240..a4ad957 100644 (file)
@@ -618,9 +618,6 @@ function loadNewPost(postId) {
                                        return false;
                                }
                        });
-                       newPost = $(data.post.html).addClass("hidden").click(function() {
-                               markPostAsKnown(this);
-                       });
                        if (firstOlderPost != null) {
                                newPost.insertBefore(firstOlderPost);
                        } else {
@@ -649,9 +646,6 @@ function loadNewReply(replyId) {
                                                return false;
                                        }
                                });
-                               newReply = $(data.reply.html).addClass("hidden").click(function() {
-                                       markPostAsKnown(getPostElement(this));
-                               });
                                if (firstNewerReply != null) {
                                        newReply.insertBefore(firstNewerReply);
                                } else {