From e3cb427feefbbb4fd6a5e76ce77ef80a240941f1 Mon Sep 17 00:00:00 2001 From: czaks Date: Sat, 27 Jul 2013 00:57:12 -0400 Subject: ukko: fix javascript interoperation --- js/expand.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'js/expand.js') diff --git a/js/expand.js b/js/expand.js index a737ee7f..06151627 100644 --- a/js/expand.js +++ b/js/expand.js @@ -15,7 +15,7 @@ $(document).ready(function(){ if($('div.banner').length != 0) return; // not index - $('div.post.op span.omitted').each(function() { + var do_expand = function() { $(this) .html($(this).text().replace(_("Click reply to view."), ''+_("Click to expand")+'.')) .find('a').click(function() { @@ -52,5 +52,13 @@ $(document).ready(function(){ } }); }); + } + + $('div.post.op span.omitted').each(do_expand); + + $(document).bind("new_post", function(e, post) { + if (!$(post).hasClass("reply")) { + $(post).find('div.post.op span.omitted').each(do_expand); + } }); }); -- cgit v1.3