summaryrefslogtreecommitdiff
path: root/js/expand.js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-07-27 00:57:12 -0400
committerczaks <marcin@6irc.net>2013-07-27 00:57:12 -0400
commite3cb427feefbbb4fd6a5e76ce77ef80a240941f1 (patch)
tree4ab6c32d5b788eefab9c4c4a654675f0aeb086aa /js/expand.js
parent35f8730f40d745b93cefbca92d5e83a18599f70c (diff)
ukko: fix javascript interoperation
Diffstat (limited to 'js/expand.js')
-rw-r--r--js/expand.js10
1 files changed, 9 insertions, 1 deletions
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."), '<a href="javascript:void(0)">'+_("Click to expand")+'</a>.'))
.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);
+ }
});
});