javascripts: fixed interactions (BEWARE, inline-expanding.js now requires jquery! fix your configs)
Conflicts: js/expand.js js/inline-expanding.js
This commit is contained in:
parent
e648121e4a
commit
2868dd7886
@ -14,7 +14,7 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
if($('div.banner').length != 0)
|
if($('div.banner').length != 0)
|
||||||
return; // not index
|
return; // not index
|
||||||
|
|
||||||
$('div.post.op span.omitted').each(function() {
|
$('div.post.op span.omitted').each(function() {
|
||||||
$(this)
|
$(this)
|
||||||
.html($(this).text().replace(_("Click reply to view."), '<a href="javascript:void(0)">'+_("Click to expand")+'</a>.'))
|
.html($(this).text().replace(_("Click reply to view."), '<a href="javascript:void(0)">'+_("Click to expand")+'</a>.'))
|
||||||
@ -51,4 +51,4 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
@ -14,7 +14,7 @@
|
|||||||
onready(function(){
|
onready(function(){
|
||||||
var inline_expand_post = function() {
|
var inline_expand_post = function() {
|
||||||
var link = this.getElementsByTagName('a');
|
var link = this.getElementsByTagName('a');
|
||||||
|
|
||||||
for (var i = 0; i < link.length; i++) {
|
for (var i = 0; i < link.length; i++) {
|
||||||
if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].className != 'file') {
|
if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].className != 'file') {
|
||||||
link[i].childNodes[0].style.maxWidth = '95%';
|
link[i].childNodes[0].style.maxWidth = '95%';
|
||||||
@ -54,7 +54,7 @@ onready(function(){
|
|||||||
|
|
||||||
if (window.jQuery) {
|
if (window.jQuery) {
|
||||||
$('div[id^="thread_"]').each(inline_expand_post);
|
$('div[id^="thread_"]').each(inline_expand_post);
|
||||||
|
|
||||||
// allow to work with auto-reload.js, etc.
|
// allow to work with auto-reload.js, etc.
|
||||||
$(document).bind('new_post', function(e, post) {
|
$(document).bind('new_post', function(e, post) {
|
||||||
inline_expand_post.call(post);
|
inline_expand_post.call(post);
|
||||||
@ -64,4 +64,3 @@ onready(function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -46,5 +46,9 @@ onready(function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
$('div.post.reply').each(showBackLinks);
|
$('div.post.reply').each(showBackLinks);
|
||||||
|
|
||||||
|
$(document).bind('new_post', function(e, post) {
|
||||||
|
showBackLinks.call(post);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user