From 606b39450d29194fd7241898cfd4d1b9746a3c8b Mon Sep 17 00:00:00 2001 From: czaks Date: Sun, 5 Oct 2014 18:30:47 +0200 Subject: better synchronize the javascripts with 8chan --- js/id_highlighter.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/id_highlighter.js') diff --git a/js/id_highlighter.js b/js/id_highlighter.js index 82e2c79d..d0a5fabf 100644 --- a/js/id_highlighter.js +++ b/js/id_highlighter.js @@ -23,7 +23,7 @@ if (active_page == 'thread' || active_page == 'index') { return toRet; } - $(".poster_id").click(function(){ + var id_highlighter = function(){ var id = $(this).text(); if($.inArray(id, idshighlighted) !== -1){ @@ -39,6 +39,12 @@ if (active_page == 'thread' || active_page == 'index') { $(this).addClass("highlighted"); }); } + } + + $(".poster_id").on('click', id_highlighter); + + $(document).on('new_post', function(e, post) { + $(post).find('.poster_id').on('click', id_highlighter); }); }); } -- cgit v1.3