diff options
| author | czaks <marcin@6irc.net> | 2014-10-05 18:30:47 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-10-05 18:30:47 +0200 |
| commit | 606b39450d29194fd7241898cfd4d1b9746a3c8b (patch) | |
| tree | 663094e1487f56b287e6065525472cea61399cca /js/id_highlighter.js | |
| parent | 1964279436f61e56e6b138b64d9d4f6e476fdc02 (diff) | |
better synchronize the javascripts with 8chan
Diffstat (limited to 'js/id_highlighter.js')
| -rw-r--r-- | js/id_highlighter.js | 8 |
1 files changed, 7 insertions, 1 deletions
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); }); }); } |
