forked from leftypol/leftypol
ukko: fix javascript interoperation
Conflicts: js/expand.js js/hide-threads.js templates/themes/ukko/ukko.js
This commit is contained in:
parent
2868dd7886
commit
45ead9803f
3 changed files with 26 additions and 6 deletions
13
js/expand.js
13
js/expand.js
|
@ -14,8 +14,9 @@
|
|||
$(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() {
|
||||
|
@ -50,5 +51,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);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue